Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support onLoad synthetic event attribute on 'object' tags #5781

Merged
merged 1 commit into from Mar 7, 2016

Conversation

Projects
None yet
4 participants
@ara4n
Copy link
Contributor

commented Jan 5, 2016

It seems like a bug that onLoad attributes are ignored on 'object' tags - this fixes it by cargoculting the 'iframe' tag example. This is useful for telling when SVGs have loaded when SVGs are embedded as objects (such that the SVG can be dynamically edited from JS).

support onLoad synthetic event attribute on 'object' tags - useful fo…
…r telling when SVGs embedded as objects have loaded
@syranide

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2016

I'm curious; should this apply to <embed> as well perhaps? What about the error-event?

@ara4n

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2016

yup, <embed> should probably also fire onLoad, and yup, they should probably also both fire onError too (although from looking at the event inspector in Chrome, it seemed that React had already installed an error listener for <object>). I guess I wanted to check that this is the right approach before extending it to too many other missing tags & events...

@facebook-github-bot

This comment has been minimized.

Copy link

commented Feb 19, 2016

@ara4n updated the pull request.

@zpao zpao added this to the 15.0 milestone Feb 29, 2016

@zpao

This comment has been minimized.

Copy link
Member

commented Mar 7, 2016

I've been playing around with this a bit and I can't get error events out of object elements, nor can I get load (or error) events out of embeds. Also, gets a bit tricky since the load event doesn't even fire consistently (can get it for SVGs but not others). I think this is probably fine pretty much as is. And if we need to we can always follow up. I'll give it a bit of a closer look shortly and merge tonight. Thanks (and sorry for the delay!)

zpao added a commit that referenced this pull request Mar 7, 2016

Merge pull request #5781 from ara4n/master
support onLoad synthetic event attribute on 'object' tags

@zpao zpao merged commit f3738d2 into facebook:master Mar 7, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

richvdh added a commit to matrix-org/matrix-react-sdk that referenced this pull request Apr 17, 2016

Drop workaround for object.onLoad
facebook/react#5781 has been fixed in React 15.0, so
drop our workaroud for it.

@renovate renovate bot referenced this pull request Feb 2, 2018

Open

Update dependency react to v0.14.9 #29

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.