[Pkg-javascript-commits] [dojo] 13/17: fixes #17718, browser sniffing for old dojo.io.script
David Prévot
taffit at moszumanska.debian.org
Thu Mar 24 04:28:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.7.9
in repository dojo.
commit ec673095ebe9574ff3b963219432435e237805b0
Author: Dylan Schiemann <dylan at dojotoolkit.org>
Date: Wed Jan 6 04:44:50 2016 -0700
fixes #17718, browser sniffing for old dojo.io.script
---
io/script.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/io/script.js b/io/script.js
index 58e1edc..a71e3ec 100644
--- a/io/script.js
+++ b/io/script.js
@@ -1,4 +1,4 @@
-define(["../main"], function(dojo) {
+define(["../main", "has"], function(dojo, has) {
// module:
// dojo/io/script
// summary:
@@ -41,7 +41,13 @@ dojo.declare("dojo.io.script.__ioArgs", dojo.__IoArgs, {
});
=====*/
- var loadEvent = dojo.isIE ? "onreadystatechange" : "load",
+ has.add("script-readystatechange", function(global, document){
+ var script = document.createElement("script");
+ return typeof script["onreadystatechange"] !== "undefined" &&
+ (typeof global["opera"] === "undefined" || global["opera"].toString() !== "[object Opera]");
+ });
+
+ var loadEvent = has("script-readystatechange") ? "onreadystatechange" : "load",
readyRegExp = /complete|loaded/;
dojo.io.script = {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list