Re: OnLoad vs Rendition. FireFox vs Opera. which is correct?

On 9/18/07, Oliver Hunt <oliver@apple.com> wrote:
> Have you tried in Safari (mac/win)?  It should end up running prior
> to first paint.
>
> --Oliver
>

I don't have a Mac, I may request one.  But you raise an important
point, I should have posted some markup.

In transferring this, I discovered that ASV behaves as I would expect.
 onload then render.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg id="svg-apm"
   version="1.1"
   baseProfile="full"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   width="100%"
   height="100%"
   viewBox="0,0,1280,720"
   onload="graspInit(evt)">
   <defs>
		<script type="text/ecmascript"> <![CDATA[
	function graspInit(evt)
	{
		alert( 'onload time, if there is a black circle shown (and this is
not a refresh) rendition ocurred first' );
	}
	]]> </script>
   </defs>
	<circle cx="640" cy="360" r="300"/>
</svg>





> On 18/09/2007, at 11:56 AM, Rick wrote:
>
> >
> > SVG-WG:
> >
> > Hi guys.
> >
> > I have an application that runs a script at onload.  This is common
> > enough.
> >
> > Firefox runs the script first and then renders the image.
> >
> > Opera renders first and then runs the script.
> >
> > Is this behaviour defined by the spec?
> >
> > 16.2 / onload says: The event is triggered at the point at which the
> > user agent has fully parsed the element and its descendants and is
> > ready to act appropriately upon that element, such as being ready to
> > render the element to the target device. Referenced external resources
> > that are required must be loaded, parsed and ready to render before
> > the event is triggered. Optional external resources are not required
> > to be ready for the event to be triggered.
> >
> > Is this a bug?  I believe that it is.  Who do I file the bug with?
> > bugs.opera.com is not responding, so I don't know if there is a bug
> > filed there.  I found nothing with a cursory Google on the matter.
> >
> > I'm not particularly fussy about which behavior is correct, but my
> > feeling, and my interpretation of the above is that FF is correct and
> > that Opera is in error when it renders before running a script
> > triggered by the onload event.
> >
> > I'd like the groups opinion (and weight) before I file anything.
> >
> > --
> > Cheers!
> > Rick
> >
>
>


-- 
Cheers!
Rick

Received on Tuesday, 18 September 2007 19:27:43 UTC