Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Indicates a script is not yet loaded, or must not be loaded, depending on the Check function being used... |
Notes
This constant can be used in two scenarios:
- Checking if a script is not yet loaded via Check.has() and Check.versionOf() functions
- Requiring a script not to be loaded via the Check.doWhen() and Check.required() functions
Examples
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
if (Check.versionOf("foo.js") == Check.NOT_LOADED) { // foo.js is not loaded } // this might causewill attempt to load foo.js toif not bealready autoloadedloaded... if (Check.has("foo.js") == Check.NOT_LOADED) { // tried to load foo.js but did not succeed } else { // foo.js autoloaded or was already loaded } // this will prevent not attempt to autoload foo.js from being autoloaded... if (Check.has("foo.js", Check.NOT_LOADED)) { // foo.js is not loaded } else { // foo.js was already loaded } |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
var dependencies = { "bar.js": Check.ANY_VERSION, "foo.js": Check.NOT_LOADED }; // the task will only run if bar.js is loaded and foo.js is *not* loaded Check.doWhen(dependencies, self, task); // will throw an error if bar.js is not loaded or foo.js is loaded Check.required(dependencies, self); |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Dependency CheckingTopics:
|