From 1354d17270961fff662d40f90521223f8fd0d73b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 18:59:10 +0400 Subject: update dojo to 1.7.3 --- lib/dojo/selector/_loader.js.uncompressed.js | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lib/dojo/selector/_loader.js.uncompressed.js (limited to 'lib/dojo/selector/_loader.js.uncompressed.js') diff --git a/lib/dojo/selector/_loader.js.uncompressed.js b/lib/dojo/selector/_loader.js.uncompressed.js new file mode 100644 index 000000000..9543069e1 --- /dev/null +++ b/lib/dojo/selector/_loader.js.uncompressed.js @@ -0,0 +1,45 @@ +define("dojo/selector/_loader", ["../has", "require"], + function(has, require){ +// summary: +// This module handles loading the appropriate selector engine for the given browser +"use strict"; +var testDiv = document.createElement("div"); +has.add("dom-qsa2.1", !!testDiv.querySelectorAll); +has.add("dom-qsa3", function(){ + // test to see if we have a reasonable native selector engine available + try{ + testDiv.innerHTML = "

"; // test kind of from sizzle + // Safari can't handle uppercase or unicode characters when + // in quirks mode, IE8 can't handle pseudos like :empty + return testDiv.querySelectorAll(".TEST:empty").length == 1; + }catch(e){} + }); +var fullEngine; +var acme = "./acme", lite = "./lite"; +return { + load: function(id, parentRequire, loaded, config){ + var req = require; + // here we implement the default logic for choosing a selector engine + id = id == "default" ? has("config-selectorEngine") || "css3" : id; + id = id == "css2" || id == "lite" ? lite : + id == "css2.1" ? has("dom-qsa2.1") ? lite : acme : + id == "css3" ? has("dom-qsa3") ? lite : acme : + id == "acme" ? acme : (req = parentRequire) && id; + if(id.charAt(id.length-1) == '?'){ + id = id.substring(0,id.length - 1); + var optionalLoad = true; + } + // the query engine is optional, only load it if a native one is not available or existing one has not been loaded + if(optionalLoad && (has("dom-compliant-qsa") || fullEngine)){ + return loaded(fullEngine); + } + // load the referenced selector engine + req([id], function(engine){ + if(id != "./lite"){ + fullEngine = engine; + } + loaded(engine); + }); + } +}; +}); -- cgit v1.2.3-54-g00ecf