DOMContentLoaded bug?

1 view
Skip to first unread message

dcolo...@sympatico.ca

unread,
Sep 28, 2007, 9:49:42 AM9/28/07
to Prototype: Core
I noticed that when using the DOMContentLoaded functionality of the
new beta in IE, the browser will receive 404 calls (test it using
filder).

I believe the error is from this line (4014) in the latest beta (1.6)

"src='://javascript:void(0)'><\/script>");

It should read:

"src='javascript:void(0)'><\/script>");

Anyone else notice this?

Tobie Langel

unread,
Sep 28, 2007, 9:58:15 AM9/28/07
to Prototype: Core
yup, we're going to correct this asap.

Regards,

Tobie

On Sep 28, 3:49 pm, "dcolomva...@sympatico.ca"

Ihárosi Wiktor

unread,
Sep 28, 2007, 10:44:45 AM9/28/07
to prototy...@googlegroups.com
Tobie Langel wrote:
> yup, we're going to correct this asap.
>> I believe the error is from this line (4014) in the latest beta (1.6)
>> "src='://javascript:void(0)'><\/script>");
>> It should read:
>> "src='javascript:void(0)'><\/script>");
>> Anyone else notice this?

there was another thread that discuss this.
http://groups.google.com/group/prototype-core/browse_thread/thread/595cc8af97ca4d38/36348e09d6f579da?hl=en&lnk=gst&q=bug%3F&rnum=5

and src shouldn't contain 'javascript' at all.

base on dean edward's base2 the correct solution is:

document.write("<script id=__ready defer src=//:><\/script>");

the original source code:
http://base2.googlecode.com/svn/trunk/lib/src/base2-dom.js

hope this helps.

wiktor

Ryan Gahl

unread,
Sep 28, 2007, 10:52:08 AM9/28/07
to prototy...@googlegroups.com
Are you guys making sure to do a check first to see if the DOM has already been loaded before generating this hack? If not, I'm afraid the approach will break in cases where the lib gets loaded on demand. Please test this well, and don't just say "well we never intended for this lib to be loaded on demand" :)
--
Ryan Gahl
Manager, Senior Software Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
--
Architect
WebWidgetry.com / MashupStudio.com
Future Home of the World's First Complete Web Platform
--
Inquire: 1-262-951-6727
Blog: http://www.someElement.com
LinkedIn Profile: http://www.linkedin.com/in/ryangahl

jeremiah

unread,
Sep 29, 2007, 2:42:02 PM9/29/07
to Prototype: Core
Absolutely! good catch.

didn't notice the ridiculously simple typo in the code. many thanks
for noticing. i had just put a conditional in the code to execute a
window.load for IE instead of document.contentloaded.

i can now remove a bug that was bugging me... thank-you.

On Sep 28, 9:49 am, "dcolomva...@sympatico.ca"

jdalton

unread,
Sep 30, 2007, 2:01:44 AM9/30/07
to Prototype: Core
Recently there was more discussion about contentLoaded on ajaxian.
A couple of new ways of detecting dom load was mentioned.

http://ajaxian.com/archives/more-fun-with-domcontentloaded

Reply all
Reply to author
Forward
0 new messages