Git Product home page Git Product logo

Comments (8)

kpreid avatar kpreid commented on August 28, 2024

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?

from caja.

kpreid avatar kpreid commented on August 28, 2024

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.

from caja.

kpreid avatar kpreid commented on August 28, 2024

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".

from caja.

kpreid avatar kpreid commented on August 28, 2024

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

from caja.

kpreid avatar kpreid commented on August 28, 2024

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.

from caja.

kpreid avatar kpreid commented on August 28, 2024

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

from caja.

kpreid avatar kpreid commented on August 28, 2024

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

from caja.

kpreid avatar kpreid commented on August 28, 2024

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.

from caja.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.