UNPKG

dojo

Version:

Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.

113 lines (103 loc) 2.81 kB
<!--<html> <head> <style type="text/css"> span.pass {background-color:green} span.fail {background-color:red} </style> </head> <body> <p id="status">running</p> <script type="text/javascript"> //#1,,src,./dojo",src,./dtk-i18n-test (function(){ var escapes = { "&": "&amp;", "<": "&lt;", ">": "&gt;", "\"": "&quot;", "'": "&#039;" }; function escape(unsafe) { return unsafe.replace(/[&<>"']/g, function (match) { return escapes[match]; }); } var hashInfo = location.search.substring(1), options = hashInfo.split(","); async = options[0]=="async" ? true : undefined, locale = options[1], dojoType = options[2], dojoLocation = options[3], i18nTestType = options[4], i18nTestLocation = options[5], testId = "async: " + async + ", locale: " + locale + ", dojo: " + dojoType + ", i18nTest: " + i18nTestType + "(" + hashInfo + ")", testKind = options[6]; if ((/^http/i).test(i18nTestLocation)) { return; } document.getElementById("status").innerHTML += escape(hashInfo); function report(result){ require(["doh"], function(doh){ doh.register(testId, function(t){ t.is(result, true); }); doh.run(); }); var text; if(result===true){ text = "<span class='pass'>PASS</span>: " + testId; }else{ text = "<span class='fail'>FAIL</span>: " + testId + "<br>" + result; } document.getElementById("status").innerHTML = escape(text); } dojoConfig = { testConfig:options, async:async, locale:locale, baseUrl:"..", packages:[{ name:"dojo", location:dojoLocation },{ name:"doh", location:"./util/doh" },{ name:"i18nTest", location:i18nTestLocation }], callback:function(){ switch(testKind){ case "legacy": if(/legacy-built/.test(i18nTestType) && /layer/.test(i18nTestType)){ // ensure the 1.7+ i18n plugin is on board before trying to load a legacy-built module as a layer require(["dojo/i18n"], function(){ require(["i18nTest/legacyModule"], function(){ report(i18nTest.legacyModule()); }); }); }else{ require(["i18nTest/legacyModule"], function(){ report(i18nTest.legacyModule()); }); } break; case "amd": require(["i18nTest/amdModule"], function(amdModule){ report(amdModule.result); }); break; } } }; var node = document.createElement("script"); node.type = "text/javascript"; node.charset = "utf-8"; // If a user passes a remote URL, force it to use the local dojo node.src = ((/^http/i).test(dojoLocation) ? '../dojo' : "../" + dojoLocation) + "/dojo.js"; console.log(node.src); document.getElementsByTagName("head")[0].appendChild(node); })(); </script> </body> </html>-->