Showing whether zjrJS.Doc.lS() actually works.
Used zjrJS Version:
Stable Minified version 20141202t2322 of zjrJS.
There is no newer Beta version available.
Preconditions
Javascript must be allowed to run on this page.
Successful When...
In the form, after pressing the Load button, a Lorem Ipsum text is shown in the Output box.
Details
The Lorem Ipsum text is part of the additional script that is loaded by pressing the Load button. After the browser has completed loading the script, it calls back to a function that is part of the test script. In turn, this function only shows expected parts of the received data.
Javascript must be allowed to run on this page.
Successful When...
In the form, after pressing the Load button, a Lorem Ipsum text is shown in the Output box.
Details
The Lorem Ipsum text is part of the additional script that is loaded by pressing the Load button. After the browser has completed loading the script, it calls back to a function that is part of the test script. In turn, this function only shows expected parts of the received data.
Test Code:
var test=({
run: function () {"use strict";
if ( !test.require( "zjrJS.Doc.lS", "function" ) ) {
return false;
}
zjrJS.Doc.lS( "test.Doc.lS/ipsumdata.js", "ipsumdata" );
return false;
},
callbackLoremDataLoaded: function () {"use strict";
var one = window.document.forms.one.elements;
try {
one.output.innerHTML = test.ipsum.data;
} catch( loadErr ) {
one.output.innerHTML = loadErr.message;
}
one = null;
return false;
}
});