Issue 621 in svgweb: jquery 1.6 in MSIE gives error

13 views
Skip to first unread message

svg...@googlecode.com

unread,
Jun 11, 2011, 5:12:20 AM6/11/11
to svg-w...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Low

New issue 621 by evpozdni...@gmail.com: jquery 1.6 in MSIE gives error
http://code.google.com/p/svgweb/issues/detail?id=621

— What steps will reproduce the problem?
1. use jQuery 1.6 (or 1.6.1)
2. open page in MSIE 8

— What is the expected output? What do you see instead?
Javascript error happens:
... is undefined
file svg.js
line 56
string 90

— What version of the product are you using? On what operating system,
browser, and version of Flash?
svgweb-2011-02-03-Lurker-Above.zip
Windows XP
Internet Explorer 8.0.6001.18702
Flash 10.1.53.64

— Please provide any additional information below. Reduced test cases are
always appreciated!
I have changed the jQuery version to 1.5.2 — all works fine now!

svg...@googlecode.com

unread,
Jun 22, 2011, 3:15:02 PM6/22/11
to svg-w...@googlegroups.com

Comment #1 on issue 621 by david.qu...@gmail.com: jquery 1.6 in MSIE gives
error
http://code.google.com/p/svgweb/issues/detail?id=621

I ran into this problem too when trying to upgrade from jQuery 1.5 to 1.6.1
in my svgweb application.


The short solution:
It was found that moving all non-svgweb script tags out of the <head>
section of the page and putting them at the very bottom solved this problem.


Detailed explanation:
The error that was reported in the original post was thrown from line 2274
of svg-uncompressed.js. This is where svgweb tries to get the value of
the 'onsvgload' attribute from the HTML body tag. This was failing because
the statement
>> body = document.getElementsByTagName('body')[0]
was returning undefined.

Through a lot of debugging using Visual Studio, it became apparent that for
some reason (the exact cause still is still unknown) Internet Explorer did
not parse the HTML document fully when jQuery 1.6(.1) was used instead of
jQuery 1.5(.1|2). This meant that when the empty script that svgweb adds
to the end of the file to test the DOM's ready-state was 'finished'
loading, the DOM didn't exist or wasn't parsed for whatever reason. The
result is that the the body of the document was undefined.

This suggested that the process of loading jQuery 1.6 immediately after
svgweb was somehow corrupting the process of parsing the entirety of the
HTML file. A point to note is that during testing, when loading just
svgweb or just jQuery Internet Explorer had no issues parsing the entire
document. Somehow, the combination of svgweb and jQuery 1.6(.1) caused it
to fail.

All this suggested that it was not a problem that could be fixed through
syntax corrections (at least without far more in-depth knowledge of both
projects). So, to try and give Internet Explorer a chance to parse the
HTML before the scripts were loaded (and potentially corrupt the loading
process) the scripts were moved to the end of the HTML file which solved
the problem.

From what I have seen in dealing with this issue, I would lean towards this
being a problem with the changes made to jQuery in 1.5.2->1.6 since that is
when the error arose. It is my best-guess that it is not a problem with
svgweb, but I could be wrong.

Note: I had my svg included directly in the HTML with a <script
type="image/svg+xml"> tag. I have not tested things with the <embed>
method of including SVG code.

svg...@googlecode.com

unread,
Aug 23, 2011, 6:31:05 PM8/23/11
to svg-w...@googlegroups.com

Comment #2 on issue 621 by pedro.al...@webdetails.pt: jquery 1.6 in MSIE
gives error
http://code.google.com/p/svgweb/issues/detail?id=621

Same issue! Thanks man!

svg...@googlecode.com

unread,
Sep 9, 2011, 2:12:44 PM9/9/11
to svg-w...@googlegroups.com

Comment #3 on issue 621 by pmgal...@gmail.com: jquery 1.6 in MSIE gives
error
http://code.google.com/p/svgweb/issues/detail?id=621

David, did you test to see if this still happens in 1.6.2?

svg...@googlecode.com

unread,
Oct 5, 2012, 3:57:30 PM10/5/12
to svg-w...@googlegroups.com

Comment #4 on issue 621 by haas...@gmail.com: jquery 1.6 in MSIE gives error
http://code.google.com/p/svgweb/issues/detail?id=621

Same/similar issue:
jquery.min.js Object doesn't support this property or method Line: 2 Char:
9774

svgweb-2011-02-03-Lurker-Above.zip
Windows XP
Internet Explorer 8.0.6001.18702
Flash 11.4.402.278
jQuery v1.8.2

On simple web pages the error occurs ~100% of the time with the script tags
in the head and ~0% of the time with the script tags just before </body>.

On complex web pages the error occurs ~90% of the time with the script tags
in the head and ~20% of the time with the script tags just before </body>.

svg...@googlecode.com

unread,
Jan 4, 2013, 4:28:53 AM1/4/13
to svg-w...@googlegroups.com

Comment #5 on issue 621 by Toop_Phi...@talk21.com: jquery 1.6 in MSIE gives
error
http://code.google.com/p/svgweb/issues/detail?id=621

I think that the priority of this defect should be raised. JQuery is
becoming an essential tool on every web page and SVGWEB not working with it
is not an acceptable situation.

Reply all
Reply to author
Forward
0 new messages