[Pkg-javascript-commits] [dojo] 130/149: fixes #14629, unbreak build with document.contains check

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository dojo.

commit d28eb010cce1b4f977520357a4cbc5191da886a6
Author: Dylan Schiemann <dylan at dojotoolkit.org>
Date:   Wed Jan 6 16:34:00 2016 -0700

    fixes #14629, unbreak build with document.contains check
---
 dom.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dom.js b/dom.js
index 7cae0eb..65098e5 100644
--- a/dom.js
+++ b/dom.js
@@ -1,5 +1,5 @@
-define(["./sniff", "./_base/window"],
-		function(has, win){
+define(["./sniff", "./_base/window", "./_base/kernel"],
+		function(has, win, kernel){
 	// module:
 	//		dojo/dom
 
@@ -95,7 +95,9 @@ define(["./sniff", "./_base/window"],
 	// Test for DOMNode.contains() method, available everywhere except FF8-
 	// and IE8-, where it's available in general, but not on document itself,
 	// and also problems when either ancestor or node are text nodes.
-	has.add("dom-contains", !!document.contains);
+
+	var doc = kernel.global["document"] || null;
+	has.add("dom-contains", !!(doc && doc.contains));
 	dom.isDescendant = has("dom-contains") ?
 		// FF9+, IE9+, webkit, opera, iOS, Android, Edge, etc.
 		function(/*DOMNode|String*/ node, /*DOMNode|String*/ ancestor){

-- 
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