This project is archived and is in readonly mode.

#52 ✓duplicate
Thomas Aylott

Asset.javascript onload fires 3 times in Opera

Reported by Thomas Aylott | May 28th, 2008 @ 10:05 AM

Originally posted on Trac by ghouston

Original Trac Ticket

Description

Asset.javascript onload fires 3 times in Opera.

window.addEvent('domready', function(){

	new Asset.javascript('scripts/test.js', {
		'onload': function(){
			alert('test');
		}
	});	
	
});	

With the test above Opera will trigger three alert windows.

This is with r1514.

See test case:

http://greghoustondesign.com/exa...

Also, please consider adding the onload event to the Asset.javascript documentation. It is unclear that though there is no onSuccess or onComplete for Asset.javascript that there is an onload.

Trac Attachments

Trac Comments

Changed 2 months ago by ghouston


        
This is with Opera 9.26, Build 8835 

      

Changed 1 month ago by Kalle


        
This does not occur for me in Opera 9.50 Beta 

      

Changed 1 month ago by kmike


        
with my opera 9.50 beta (Build 9613) - from 2 to 4 alert windows 

      

Comments and changes to this ticket

  • Stickman

    Stickman July 8th, 2008 @ 03:48 PM

    • Tag set to defect, major, plugins

    Because Opera supports the load event for Script elements,

    this is easily fixed by replacing this line:

    if (['loaded', 'complete'].contains(this.readyState)) load();

    with this (or something similar):

    if (Browser.Engine.trident && ['loaded', 'complete'].contains(this.readyState)) load();

    ...so that only IE tracks readystate.

  • Aaron Newton

    Aaron Newton February 19th, 2009 @ 12:11 AM

    • Assigned user changed from “Valerio” to “Aaron Newton”
    • Tag changed from defect, major, plugins to defect
    • Milestone cleared.
  • fakedarren

    fakedarren February 8th, 2010 @ 03:25 PM

    • State changed from “new” to “open”
  • fakedarren

    fakedarren February 13th, 2010 @ 11:33 AM

    • State changed from “open” to “duplicate”

    I am marking this as a duplicate of #177. Please watch #177 if you wish to receive status updates.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Tags

Referenced by

Pages