[kupu-checkins] r36182 - kupu/trunk/kupu/common
fschulze at codespeak.net
fschulze at codespeak.net
Sun Jan 7 00:32:29 CET 2007
Author: fschulze
Date: Sun Jan 7 00:32:26 2007
New Revision: 36182
Modified:
kupu/trunk/kupu/common/sarissa.js
Log:
Check for existence of variable before accessing it. Fixes error in Safari.
Modified: kupu/trunk/kupu/common/sarissa.js
==============================================================================
--- kupu/trunk/kupu/common/sarissa.js (original)
+++ kupu/trunk/kupu/common/sarissa.js Sun Jan 7 00:32:26 2007
@@ -364,7 +364,7 @@
//if(window.XMLDocument) , now mainly for opera
}// TODO: check if the new document has content before trying to copynodes, check for error handling in DOM 3 LS
- else if(_SARISSA_HAS_DOM_FEATURE && !Document.prototype.load && document.implementation.hasFeature('LS', '3.0')){
+ else if(_SARISSA_HAS_DOM_FEATURE && (typeof Document != 'undefined') && !Document.prototype.load && document.implementation.hasFeature('LS', '3.0')){
//Opera 9 may get the XPath branch which gives creates XMLDocument, therefore it doesn't reach here which is good
/**
* <p>Factory method to obtain a new DOM Document object</p>
More information about the kupu-checkins
mailing list