addEventListener on windows build Topic is solved

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

CYBERDEViLNL

addEventListener on windows build

Unread post by CYBERDEViLNL » 2017-08-15, 13:51

Hello people,

I'm trying to develop a addon that involves addEventListener wich should triggered after the page loaded. On my linux build of Pale-Moon it works fine but on the windows build of Pale-Moon nothing happends.

Here is the code I tried:

Code: Select all

var test_ext = function () {
        var prefManager = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
        return {
                init : function () {
                        gBrowser.addEventListener("load", function () {
                                alert('Yes tap load complete..');
                        }, false);
                },

                run : function () {
                        alert('Yes, button works nicely.');
                }
        };
}();
window.addEventListener("load", test_ext.init, false);
Linux build: Version: 27.5.0a1 (64-bit) (2017-08-12)
Windows build: Version: 27.4.1 (64-bit)

Is there something wrong with the code?

Locked