Hello everyone,

I have created a public gist <https://gist.github.com/tomschulze/afdda960b8c63a3fde0db6cb2ceea0ae> with a minimal working example. I am trying to put JavaScript Code from a Widget to an external JS file and load it dynamically with the ResourceLoader. However, the developer console returns the following error: jQuery.Deferred exception: drawmap is not defined when I am accessing the function defined in the external script. Checking the state in the developer console with 'mw.loader.getState("ext.iswiki.display_project_map")' returns: "ready".

When the Resource Loader debug mode is enabled in LocalSettings.php the function is found and called.

What am I doing wrong?

Kind regards,

Tom

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to