Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36780
    Jamesk
    Participant

    Could you transition from using window.onload to initialise the plugin, as this is causing issues which prevent the plugin from operating if any other javascript has been attached to the window.onload event

    If a user has any other javascript (custom or from a plugin) attached to the window.onload event then the last loaded piece of javascript attached to the event will be the only javascript run for that event.

    it would be preferable if the init function was called in the following way

    
    window.addEventListener("load", function () {
    	cookieNotice.init();
    }, false);
    

    This will allow the cookie notice to work as expected, as the init function will be called, as this method of attaching the js to the event isn’t affected by multiple pieces of js being attached to the event in the same way that onload is.

    #36796
    Bartosz
    Keymaster

    Thanks,
    Checking that – but expect it to be adjusted next release.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.