Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

<img> and <link> event handling improvements

#152

Just filing this in case someone is making release notes.

img.src = XXX and link.href=XXX handling is spotty and does not give the end-user(application) control or access to the events (in case you actually do want to load in the images or css files). The rules are non-obvious (I tested every case on real browsers) and slightly tricky to make sure events are not double fired.

This patch provides two new (optional) apis

envjs.loadImage(node, src)
envjs.loadLink(node, href)

if they exists, they are called. Returning true, will file the load event, false the error event.

the commit will be in shortly. With full unit tests of course.

--nickg

Reported by nickg · April 14th, 2010 @ 03:43 PM

State: resolved
Milestone: none
Assigned to: nickg nickg

Activity

  1. nickg
    nickg
    • State changed from new to resolved

    ok it's in.

    should be 100% invisible/compatible/backwards-compatible unless you are actually using load events

    April 14th, 2010 @ 03:58 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.