This AI is still in early stages of development.
Check.NOT_LOADED
- Aubergine
Owned by Aubergine
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
Checking if a script is not loaded...
if (Check.versionOf("foo.js") == Check.NOT_LOADED) { // foo.js is not loaded } // this will attempt to load foo.js if not already loaded... 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 not attempt to autoload foo.js... if (Check.has("foo.js", Check.NOT_LOADED)) { // foo.js is not loaded } else { // foo.js was already loaded }
Requiring a script to be not loaded...
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);
Contents
Jump to:
Dependency Checking
Topics:
- Tricks for including files — Some tricks with the include() function...
- Dependency Descriptor Object — Define one or more dependencies for your script...
- Check() — Perform a soft-check to see if a dependency is available...
- Check.basePath — The base path to the folder that contains the APIs folder...
- Check.paths[] — Define one or more folder paths to enable autoloading...
- Check.doWhen() — Perform a task when dependencies become available.
- Check.has() — Check if a dependency is available, try and load it if not, return availability state...
- Check.LAZY_LOAD — Disable autoloading during a dependency check...
- Check.required() — Thrown a descriptive error if dependency check fails...
- Check.NOT_LOADED — Indicates a script is not yet loaded, or must not be loaded, depending on the Check function being used...
- Check.ANY_VERSION — Skip version checking for a dependency check...
- Check.provide() — Indicate a file is now available.
- Check.versionOf() — Check the version of a dependency.
- Self Descriptor Object — Define the filename and version of your script...