New issue 616 by joshua.p...@gmail.com: document.getElementById() errors in
IE9 Standards Mode for Non-Existent ID
http://code.google.com/p/svgweb/issues/detail?id=616
What steps will reproduce the problem?
1. Open any document which includes svgweb and is in IE9 standards mode
(mode can be turned on in toolbar of IE9's built in dev tools)
2. in the console, enter document.getElementById('somejunk_adsfasd')
What is the expected output? What do you see instead?
null, but get an error
What version of the product are you using? On what operating system,
browser, and version of Flash?
IE9, svgweb LA
Please provide any additional information below. Reduced test cases are
always appreciated!
I think this is a highly critical bug. svgweb brokes the most of javascript
apps with IE9.
Code to reprocuce, with IE9 in standard mode:
{{{
<html>
<head>
<script src="js/svgweb/src/svg.js" data-path="js/svgweb/src"
data-debug="false"></script>
<script type="text/javascript">
go = function() { alert($('Idontexist')); }
window.onsvgload = go ;
</script>
</head>
<body >
</body>
</html>
}}}
I think this is a highly critical bug. svgweb brokes the most of javascript
apps with IE9.
Code to reprocuce, with IE9 in standard mode:
{{{
<html>
<head>
<script src="js/svgweb/src/svg.js" data-path="js/svgweb/src"
data-debug="false"></script>
<script type="text/javascript">
go = function() { alert(document.getElementById('Idontexist')); }
I modified the compressed and uncompressed version to make this error go
away. I didn't document it too well, but you can run a diff.
Works for me!
Files attached.
Attachments:
svg.js 105 KB
svg-uncompressed.js 354 KB
Oh, but the compiled version seems to solve the issue...
I believe the compiled patch also fixes issue 617. It's funny how deep the
ID problem was. Maybe the maintainers are listening to this thread and can
gain more insight form my hack-fix than I did.
I would be very curious to have the clear patch and some explanations !
I've tried to debug myself but I must admit it is hard for me. Thanks for
saving my app at short term . I hope mainteners will solve this problem for
a more long term consideration.
@Joshua: I downloaded your patched svg.js,
and it solved this issue and issue 617 as well. Thanks!
(svg.js linked in your comment
http://code.google.com/p/svgweb/issues/detail?id=616#c3 )
More anecdotal evidence, Joshua's patch solved issue 617 for me as well.