title: For-Loop Notifications Not Appearing
body: <p>I have set up a series of For-Loop generated links that are supposed to display customized messages in the form of a notification.</p>
  
  <p>The function to display the notification is in my background event page (eventPage.js):</p>
  
  <pre><code>chrome.runtime.onMessage.addListener(function(request, sender, sendResponse){
      if (request.todo == "notification"){
          var notifOptions = {
              type: 'basic',
              iconUrl: 'icon48.png',
              title: request.ttl,
              message: request.msg
          };
          chrome.notifications.create('notti', notifOptions);
      }
  });
  </code></pre>
  
  <p>Meanwhile, on the content page (content.js), there is are two conditions that link to this function:</p>
  
  <hr>
  
  <p>First:</p>
  
  <pre><code>if (request.todo == "full"){
          chrome.runtime.sendMessage({todo: "notification", ttl: 'Title', msg: 'Test!'});
      }
  </code></pre>
  
  <p>This first function works, and the notification displays without any issues (thus, there are no problems with permissions etc.).</p>
  
  <hr>
  
  <p>The second condition is the one that doesn't work:</p>
  
  <pre><code> if(request.todo == "quick"){
          for (let i = 0; i &lt; wrds.length; i++) {
              var entry = "#"+wrds[i];
              if ($(entry).length) {
                  $(entry).on("click", function() {
                      var msg = prns[i]+'\n'+defs[i];
                      chrome.runtime.sendMessage({todo: "notification", ttl: 'Title', msg: msg});
                      alert(msg);
                  }); 
              }
          }}
  </code></pre>
  
  <p>This condition tries to set up a series of notifications in the for loop. The thing is, while the alert works perfectly, the notification doesn't appear at all.</p>
  
  <p>How do I get the for-loop generated notifications to appear?</p>