This AI is still in early stages of development.
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 6 Next »
var available = Check.has(file[, ver[, lazy]])
Number
Constant
Specify the required version of the file (exact match) or a version constant:
Default: Check.ANY_VERSION
By default, Check.has() will attempt to autoload missing dependencies.
If you want to prevent autoloading, specify Check.LAZY_LOAD
The dependency check failed.
function bleh() { if (Check.has("foo.js", 1.2)) { // do it the foo.js v1.2 way } else { // do it without any foo } }
function bleh() { if (Check.has("foo.js", 1.2, Check.LAZY_LOAD)) { // do it the foo.js v1.2 way } else { // do it without any foo } }
You can get a list of all provided dependencies using Util API diagnostics (requires Diag API).
Requires:
Jump to:
Topics: