[Pkg-javascript-commits] [dojo] 04/13: Fixes #9353 in the 1.3 branch to help with Safari 4 issues. \!strict
David Prévot
taffit at moszumanska.debian.org
Mon May 11 20:12:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.3.2
in repository dojo.
commit dd265bc0b919aa79d21dfcbdd0f3015922f6caff
Author: James Burke <jrburke at gmail.com>
Date: Thu Jun 25 02:35:46 2009 +0000
Fixes #9353 in the 1.3 branch to help with Safari 4 issues. \!strict
git-svn-id: http://svn.dojotoolkit.org/src/branches/1.3/dojo@18385 560b804f-0ae3-0310-86f3-f6aa0a117693
---
_base/html.js | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/_base/html.js b/_base/html.js
index 2566865..3c69e7f 100644
--- a/_base/html.js
+++ b/_base/html.js
@@ -354,10 +354,8 @@ if(dojo.isIE || dojo.isOpera){
=====*/
// Although we normally eschew argument validation at this
- // level, here we test argument 'node' for (duck)type.
- // Argument node must also implement Element. (Note: we check
- // against HTMLElement rather than Element for interop with prototype.js)
- // Because 'document' is the 'parentNode' of 'body'
+ // level, here we test argument 'node' for (duck)type,
+ // by testing nodeType, ecause 'document' is the 'parentNode' of 'body'
// it is frequently sent to this function even
// though it is not Element.
var gcs;
@@ -366,7 +364,7 @@ if(dojo.isIE || dojo.isOpera){
//>>excludeEnd("webkitMobile");
gcs = function(/*DomNode*/node){
var s;
- if(node instanceof HTMLElement){
+ if(node.nodeType == 1){
var dv = node.ownerDocument.defaultView;
s = dv.getComputedStyle(node, null);
if(!s && node.style){
@@ -384,7 +382,7 @@ if(dojo.isIE || dojo.isOpera){
};
}else{
gcs = function(node){
- return node instanceof HTMLElement ?
+ return node.nodeType == 1 ?
node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
};
}
--
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