Ok,
Mark answered to me directly, here is what he says about
his experience with this stylesheet related behavior in sIFR:

>On Tue, May 20, 2008 at 11:17 AM, Mark Wubben <[EMAIL PROTECTED]> wrote:
>    No idea about v1x, but Safari 2 and 3 load CSS and JavaScript in parallel
>    (<link> and <script> elements are not blocking the parsing of the 
> document).
>    This means that the DOM could be finished before the CSS is loaded. The
>    trick I use in sIFR is to poll for a certain style property on an element I
>    inject into the document. This, of course, does require one to place that
>    property in the correct stylesheet.
>

So relying on external stylesheets being loaded seems risky
and to stay cross-browser I would leave that to a specific method
if one can be found.

My method to detect stylesheets are already loaded in Opera
was based on events by using the "load" event capture phase,
this is different from how it was later implemented in jQuery,
were a setTimeout has been used instead, then the same
was applied to Safari too.

To resume, I believe the best is leave stylesheet detection out
of "dom:loaded" (as some already suggested) and just hope one
day all browser will agree on that.

Actually the fix that was needed was to ensure "dom:loaded"
fires before the "onload" event in all browser without throwing
the "Operation aborted" on IE.


--
Diego Perini


On 14 Mag, 23:19, Diego Perini <[EMAIL PROTECTED]> wrote:
> Too many combinations, probably better split that CSSLoaded.
>
> I asked Mark Wubben of sIFR to comment here, he may have
> much more experience with this specific graphic lag and may
> give more bits about Safari/Opera still needing this or not.
>
> --
> Diego Perini
>
> On 14 Mag, 19:57, John-David Dalton <[EMAIL PROTECTED]>
> wrote:
>
> > I think that the css:loaded would probably be the best way to go so it
> > doesnt delay the dom:loaded event
> > Opera uses the "disabled" approach (what if a style sheet it set to
> > disabled in the html though?)
> > and Safar used the "length" approach.
>
> > The length approach may cause issues with "import" as this test page
> > points out (the length is reported as 5 (because of the import) and
> > there are only 4 stylesheet 
> > elementshttp://www.quirksmode.org/dom/tests/stylesheets.html
>
> > - JDD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to