Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

onerror is not implemented #47

Closed
kpreid opened this issue Apr 16, 2015 · 8 comments
Closed

onerror is not implemented #47

kpreid opened this issue Apr 16, 2015 · 8 comments

Comments

@kpreid
Copy link
Contributor

kpreid commented Apr 16, 2015

Original issue 47 created by sshjason on 2008-01-25T23:04:42.000Z:

the onerror attribute is not implemented.

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #1 originally posted by mikesamuel on 2008-01-29T00:16:59.000Z:

The onerror attribute of window?

How should it behave? If an onerror handler is specified in the global scope, it
should receive exceptions thrown by scripts in extracted script tags?

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #2 originally posted by sshjason on 2008-01-29T01:00:14.000Z:

Mainly for data content failing to load, such as I believe the event is also raised with object tags.

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #3 originally posted by mikesamuel on 2008-01-29T02:31:31.000Z:

Do you also require onabort?

It looks like SVG also uses those.

Do you know of any good documentation on the behavior of onerror/onabort? I get
nothing by searching for "onerror onabort site:w3.org -SVG -XmlHttpRequest".

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #4 originally posted by mikesamuel on 2008-01-29T02:40:41.000Z:

There's some documentation at http://www.quirksmode.org/js/events_compinfo.html#t40

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #5 originally posted by sshjason on 2008-01-29T03:53:33.000Z:

Also looks like it only loads on img tags, not object tags.

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #6 originally posted by mikesamuel on 2008-02-19T22:35:16.000Z:

Jason,

Can you supply a testcase that you want to work?

mike

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #7 originally posted by sshjason on 2008-02-19T23:07:28.000Z:

This would be the normal way to handle an onerror with an image:

However, due to the security issues with 'this', there is:

~/Jason Hullinger

@kpreid
Copy link
Contributor Author

kpreid commented Apr 16, 2015

Comment #8 originally posted by mikesamuel on 2008-03-09T02:55:14.000Z:

If you add the following to your html attribute whitelist

types: [
  { "key": "IMG:ONCLICK", "description": "called if an image fails to load",
    "type": "SCRIPT", "optional": true },
  ],
allowed: ["IMG:ONCLICK"],

then onclick will be extracted and cajoled just like any other script attribute.

@kpreid kpreid closed this as completed Apr 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant