I have an JavaScript framework for making some HTML5 elements work in older browsers and letting users create their own elements. The function for an user to create their own element is used on another Javascript file, for example:
element('myElement').appendStyleColor('red').type('text');
For making sure the user is creating the element with my framework, I've created a variable that the user defines at the end of their file. For example:
using = "myFramework";
I had to create a test to display an alert if the variable 'using' doesn't have the value 'myFramework', but I can't get the test to work, because if the test goes it only looks in the myFramework.js file and not in the user's JavaScript file like the script.js file or the application.js file.
My code is as followed:
if (using !== "myFramework") {
alert("The value 'myFramework' is not defined in the 'using' variable.")
}
P.S : My Framework is not the real name of the framework.
** I do not want to use jQuery **