On Thu, 30 Apr 2009, Sean Hogan wrote:
Ian Hickson wrote:
On Thu, 30 Apr 2009, Sean Hogan wrote:
How do I check if the resource is already loaded? In a
cross-browser, cross-site manner?
Put an onload handler on the element before it loads and make it set a
flag you can check
On Tue, 28 Apr 2009, Boris Zbarsky wrote:
Ian Hickson wrote:
Ah, yes. good point. I can require that relatively simply (just have the
tasks that are queued for 'load' events themselves delay the page's load
event)
That's exactly what Gecko does.
should I?
I'd prefer that, but I'd
Ian Hickson wrote:
On Wed, 25 Mar 2009, Sean Hogan wrote:
Ian Hickson wrote:
On Sun, 15 Mar 2009, Boris Zbarsky wrote:
Sean Hogan wrote:
This is a request for the link element to be given an onload
attribute.
And presumably a readyState property.
On Thu, 30 Apr 2009, Sean Hogan wrote:
At least in Gecko, you can already detect whether the sheet is done
loading: if you try to get its cssRules and that throws
INVALID_ACCESS_ERR, then it's still loading. (If it throws
DOM_SECURITY_ERR then you're not
Ian Hickson wrote:
On Thu, 30 Apr 2009, Sean Hogan wrote:
At least in Gecko, you can already detect whether the sheet is done
loading: if you try to get its cssRules and that throws
INVALID_ACCESS_ERR, then it's still loading. (If it throws
DOM_SECURITY_ERR then you're not
On Mon, 27 Apr 2009, Boris Zbarsky wrote:
Ian Hickson wrote:
The spec requires the page 'load' event to be fired asynchronously.
(There's no black-box way to distinguish this from the case of waiting
for the other 'load' events to have fired, as far as I can tell.)
Phrased that way,
Ian Hickson wrote:
As far as I can tell, as specced, there isn't a race condition (other
than the inherent network race condition).
http://www.whatwg.org/specs/web-apps/current-work/#delay-the-load-event
In this case:
body onload=2
img onload=1; image = new Image(); image.src =
On Tue, 28 Apr 2009, Boris Zbarsky wrote:
The testcase I was thinking of is:
body onload=3
img onload=1; image = new Image(); image.src = 'test'; image.onload = 2
src=foo
img src=bar
In Gecko, on this testcase, the handlers always run in the order 1, 2, 3.
Ah, yes. good
Ian Hickson wrote:
Ah, yes. good point. I can require that relatively simply (just have the
tasks that are queued for 'load' events themselves delay the page's load
event)
That's exactly what Gecko does.
should I?
I'd prefer that, but I'd be interested in feedback from other implementors.
On Wed, 25 Mar 2009, Boris Zbarsky wrote:
On Sat, 14 Mar 2009, Greg Houston wrote:
On a side note, I can actually attach a functioning onload event to
a link element in Internet Explorer. Firefox, Safari, and Chrome
ignore my attempt, and Opera will fire the onload event but not
On Wed, 25 Mar 2009, Sean Hogan wrote:
Ian Hickson wrote:
On Sun, 15 Mar 2009, Boris Zbarsky wrote:
Sean Hogan wrote:
This is a request for the link element to be given an onload
attribute.
And presumably a readyState property.
At least in Gecko, you can already
Ian Hickson wrote:
The spec requires the page 'load' event to be fired asynchronously.
(There's no black-box way to distinguish this from the case of waiting for
the other 'load' events to have fired, as far as I can tell.)
Phrased that way, yes. But maybe I wasn't clear on the exact
Boris Zbarsky wrote:
Ian Hickson wrote:
The spec requires the page 'load' event to be fired asynchronously.
(There's no black-box way to distinguish this from the case of waiting
for the other 'load' events to have fired, as far as I can tell.)
Phrased that way, yes.
Or did I misunderstand
Ian Hickson wrote:
On Sun, 15 Mar 2009, Boris Zbarsky wrote:
Sean Hogan wrote:
This is a request for the link element to be given an onload
attribute.
And presumably a readyState property.
At least in Gecko, you can already detect whether the sheet is done
loading: if
Ian Hickson wrote:
So testing this:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/44
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/45
(44 uses currentStyle, for IE/Opera, 45 uses getComputedStyle, for Opera/
Firefox/Safari)
It seems Gecko is the only engine
Boris Zbarsky wrote:
No. What's paused is execution of new scripts, not of existing ones.
So in
this case, b() executes immediately, while a() executes after the
stylesheet
loads.
Woah, so this can affect the order of script execution?
Yes, just like document.write(script src=...) would,
On Tue, Mar 24, 2009 at 7:24 PM, Ian Hickson i...@hixie.ch wrote:
On Sun, 15 Feb 2009, Boris Zbarsky wrote:
So in this:
!DOCTYPE html
...
script
document.write('link rel=stylesheet href=style');
document.write('scripta();\/script');
b();
/script
On Fri, 13 Feb 2009, Boris Zbarsky wrote:
Ian Hickson wrote:
By the way, the spec doesn't yet require the blocking behavior. I
couldn't work out how to do it. Could you elaborate on when exactly in
the process the style sheet is waited on? Does it happen for all
scripts? For example,
On Sat, Mar 14, 2009 at 10:21 PM, Garrett Smith dhtmlkitc...@gmail.com wrote:
On Sat, Mar 14, 2009 at 6:54 PM, Jonas Sicking jo...@sicking.cc wrote:
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston gregory.hous...@gmail.com
wrote:
[...]
Garrett: Whatever we decide when it comes to the defer
Greg Houston wrote:
This is a request for the link element to be given an onload attribute.
And presumably a readyState property.
Jonas Sicking wrote on 15 mars 2009 02:55:
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston
gregory.hous...@gmail.com wrote:
This is a request for the link element to be given an
onload attribute.
This sounds like a good idea to me. Seems useful for dynamically added
stylesheets too, and
Sean Hogan wrote:
This is a request for the link element to be given an onload attribute.
And presumably a readyState property.
At least in Gecko, you can already detect whether the sheet is done
loading: if you try to get its cssRules and that throws
INVALID_ACCESS_ERR, then it's still
Jonas Sicking wrote:
This sounds like a good idea to me. Seems useful for dynamically added
stylesheets too, and possibly for stylesheets where the href attribute
is dynamically changed.
Same thing goes for the style element since an inline stylesheet can
have @import rules.
Indeed, and there
Here is how to obtain the functionality of a deferred style sheet for a
run-time dialogue box: the semantics of the depends attribute must be
changed so that it causes all script code *except function definitions* to
wait for the style sheet to load (and perhaps cause it to load as well);
whereas
On Sun, Mar 15, 2009 at 12:07 AM, Jonas Sicking jo...@sicking.cc wrote:
On Sat, Mar 14, 2009 at 10:21 PM, Garrett Smith dhtmlkitc...@gmail.com
wrote:
On Sat, Mar 14, 2009 at 6:54 PM, Jonas Sicking jo...@sicking.cc wrote:
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston gregory.hous...@gmail.com
Garrett Smith wrote:
On Sun, Mar 15, 2009 at 12:07 AM, Jonas Sicking jo...@sicking.cc wrote:
link.onload = function() {
displayDialog(Dialog Title, someObject);
}
Why not implement EventTarget on link? For example:
link.addEventListener('load', displayDialog, true);
It's the same thing.
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston gregory.hous...@gmail.com wrote:
This is a request for the link element to be given an onload attribute.
I see.
Often when lazy loading a plugin into an web app it is necessary for
the plugin's stylesheets to be applied before the plugin's
On Sat, Mar 14, 2009 at 4:46 PM, Garrett Smith dhtmlkitc...@gmail.com wrote:
I proposed a solution to a similar problem not too long ago.
script depends=[idref] .../script
For me to implement my own depends lazy loader without any hacks the
only thing missing is that link onload callback.
On Sat, Mar 14, 2009 at 5:24 PM, Greg Houston gregory.hous...@gmail.com wrote:
On Sat, Mar 14, 2009 at 4:46 PM, Garrett Smith dhtmlkitc...@gmail.com wrote:
I proposed a solution to a similar problem not too long ago.
script depends=[idref] .../script
For me to implement my own depends lazy
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston gregory.hous...@gmail.com wrote:
This is a request for the link element to be given an onload attribute.
Often when lazy loading a plugin into an web app it is necessary for
the plugin's stylesheets to be applied before the plugin's JavaScript
is
On Sat, Mar 14, 2009 at 6:54 PM, Jonas Sicking jo...@sicking.cc wrote:
On Sat, Mar 14, 2009 at 1:48 PM, Greg Houston gregory.hous...@gmail.com
wrote:
[...]
Garrett: Whatever we decide when it comes to the defer attribute, it
is always useful to have scripting APIs as well. There is just no
31 matches
Mail list logo