New issue 637 by osstec...@gmail.com: Error in remove the original SVG
OBJECT node from our handlers._svgObjects
http://code.google.com/p/svgweb/issues/detail?id=637
What steps will reproduce the problem?
1. Use any IE browser (IE9 force-flash)
2. Load webpage w/ svg
3. Unload webpage, error during flash cleanup
What is the expected output? What do you see instead?
IE throws error, source code line 1025 _handler is undefined
What version of the product are you using? On what operating system,
browser, and version of Flash?
svgweb-2011-02-03-Lurker-Above using IE9, Win2008 server, Flash version is
WIN 10,3,162,28
Please provide any additional information below. Reduced test cases are
always appreciated!
source code line 1025 _handler is undefined
// remove the original SVG OBJECT node from our handlers._svgObjects
// array
var objID;
if (typeof node._objID != 'undefined') { // native handler
objID = node._objID;
} else if (typeof node.contentDocument != 'undefined') { // IE
// node is a Flash node; get a reference to our fake _Document
// and then use that to get our Flash Handler
objID = node.contentDocument._handler.id;
} else {
objID = node._handler.id;
}
// remove the original SVG OBJECT node from our handlers._svgObjects
// array
var objID;
if(typeof node._objID!='undefined') { // native handler
objID=node._objID;
} else if(typeof node.contentDocument!='undefined') { // IE
// node is a Flash node; get a reference to our fake _Document
// and then use that to get our Flash Handler
/*----------------------------------
OSS:Hack temporary work around
objID = node.contentDocument._handler.id;
----------------------------------*/
objID=node.id;
} else {
objID=node._handler.id;
}
/*----------------------------------
OSS:Hack temporary work around
----------------------------------*/
if(!objID)
console.error("Can not resolve Flash handler id");
We incorrectly specified a data-path and data-htc-filename which also
included the path. Any improper definition causes
FlashHandler._prepareBehavior
// attach SVG behavior to the page
ns.doImport(libraryPath+htcFilename);
to concat an invalid filePathName resulting in .htc not to load. No errors
are thrown.
We have added a check in our startup for our stupid mistakes:
if(!gSVGDOMDoc.getElementsByTagNameNS) {
console.error("_SVG:onLoad: .htc not loaded/initialized");
return;
}