Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think it might be an issue with bracketing. Here is the relevant section of code as you have it:</p> <pre><code> function bindEvents() { // Add event listeners // In W3C, display event is called show _notification.addEventListener("display", _onshow, false); _notification.addEventListener("click", _onclick, false); _notification.addEventListener("error", _onerror, false); _notification.addEventListener("close", _onclose, false); if(_replaceId) _notification.replaceId = _replaceId; // !!IMPORTANT&amp;&amp;WEIRD!! remove next line no events will work console.log(_notification); } </code></pre> <p>If you remove the console.log line it becomes:</p> <pre><code> function bindEvents() { // Add event listeners // In W3C, display event is called show _notification.addEventListener("display", _onshow, false); _notification.addEventListener("click", _onclick, false); _notification.addEventListener("error", _onerror, false); _notification.addEventListener("close", _onclose, false); if(_replaceId) _notification.replaceId = _replaceId; } </code></pre> <p>which is probably confusing the JavaScript engine since you have a bracket-less if statement but it's followed by a closing bracket. You should try adding brackets to your if statement so it looks like:</p> <pre><code> function bindEvents() { // Add event listeners // In W3C, display event is called show _notification.addEventListener("display", _onshow, false); _notification.addEventListener("click", _onclick, false); _notification.addEventListener("error", _onerror, false); _notification.addEventListener("close", _onclose, false); if(_replaceId) { _notification.replaceId = _replaceId; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload