https://bugzilla.wikimedia.org/show_bug.cgi?id=73011
Bug ID: 73011
Summary: referenceError for userdefined javascript functions
Product: MediaWiki
Version: 1.23.4
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: major
Priority: Unprioritized
Component: ResourceLoader
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Web browser: ---
Mobile Platform: ---
Created attachment 17028
--> https://bugzilla.wikimedia.org/attachment.cgi?id=17028&action=edit
javascript reference error for custom function
I am developing an extension, let us say, "example" extension. I have added the
javascript file for this extension let us say example.js using ResourceLoader
module.
I have defined a custom function in this js file here is a test structure
example.js
*************************
function testFunction(){}
alert("hi");
************************
When Page loads the alert("hi") is executed that means the js file is there but
when I try to call the testFunction on onclick or any other event I get error,
But when I do the same by placing file like
addHTMl('<script
src="URL-/extensions/example/resources/example.js"></script>');
the function call works well, Don't know what to do.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l