Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var appendQUnit = document.createElement('script');
- appendQUnit.src = 'js/utility/qunit/qunit.js';
- appendQUnit.type = 'text/javascript';
- document.getElementsByTagName('head')[0].appendChild(appendQUnit);
- $.getScript('js/utility/qunit/qunit.js', function() {
- // here you can handle the qunit code
- });
- $.getScript('js/utility/qunit/qunit.js', function(){
- QUnit.load();
- // here you can handle the qunit code
- });
- void(function foo()
- {
- /* get head element */
- var head=document.getElementsByTagName("head")[0];
- /* create script and link elements */
- var qUnitJS = document.createElement("script");
- var qUnitCSS = document.createElement("link");
- /* link rel and type attributes required for lazy loading */
- qUnitCSS.rel="stylesheet";
- qUnitCSS.type="text/css";
- /* define script src attribute to lazy load */
- qUnitJS.src = "http://qunitjs.com/resources/qunit.js";
- /* append script and link elements */
- head.appendChild(qUnitJS);
- head.appendChild(qUnitCSS);
- /* define link href after DOM insertion to lazy load */
- qUnitCSS.href="http://qunitjs.com/resources/qunit.css";
- /* call tests after QUnit loads */
- qUnitJS.onload = function () {};
- }() )
- security.mixed_content.block_active_content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement