Versions Compared

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:

Examples

Code Block
themeRDark
languagejavascript
titleChecking if a script is not loaded...
linenumberstrue
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
themeRDark
languagejavascript
titleRequiring a script to be not loaded...
linenumberstrue
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
classbox
Availability
Status
colourYellow
titleBeta

Requires:

Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

Dependency Checking

Topics:

Child pages (Children Display)
alltrue
depthall
pageDependency Checking
excerpttrue