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

<source onError={callback}> doesn't work #5839

Closed
dmnd opened this issue Jan 12, 2016 · 6 comments
Closed

<source onError={callback}> doesn't work #5839

dmnd opened this issue Jan 12, 2016 · 6 comments

Comments

@dmnd
Copy link
Contributor

dmnd commented Jan 12, 2016

The error event on <source> elements doesn't work. Looking at #4370, it seems like there is an onError for <video> but I can't tell if that's supposed to work for <source> too.

The error event is useful so I can deduce which format the browser is using.

@zpao
Copy link
Member

zpao commented Jan 13, 2016

Do these error events bubble? We might have to attach listeners directly if not (which is what we do for the video & audio elements)

@petetnt
Copy link
Contributor

petetnt commented Jan 14, 2016

@zpao They don't bubble, so attaching listeners directly seems like the proper way.

@zpao
Copy link
Member

zpao commented Jan 16, 2016

Great, and does source have any other events? My quick research only shows error but I suspect load is there as well and probably has the same non-bubbling (basically the same as an img element). I'll try to do some testing but any pointers to specs and whatnot would be helpful.

@alunyov
Copy link
Contributor

alunyov commented Jan 16, 2016

Hey, guys! This should add onError to the <source>: #5861

@petetnt
Copy link
Contributor

petetnt commented Jan 16, 2016

@zpao The spec says that it should follow the resource selection algorithm specified here so it should also support at least loadstart.

@alunyov
Copy link
Contributor

alunyov commented Jan 16, 2016

It should, but in fact, it does not support load and loadstart. https://jsfiddle.net/n7sdjh22/

wadahiro pushed a commit to wadahiro/react that referenced this issue Jun 1, 2016
wadahiro added a commit to wadahiro/react that referenced this issue Jun 1, 2016
@jimfb jimfb closed this as completed in 518336e Jun 8, 2016
zpao pushed a commit that referenced this issue Jun 14, 2016
* Fix #5839 Add error event to source element

* Add test case for <source onError={callback}>

(cherry picked from commit 518336e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants