Skip to content

add srcLang DOM attribute #4061

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

Closed
wants to merge 1 commit into from

Conversation

revolunet
Copy link

Added missing srclang attribute, useful when rendering video elements.

Thanks !

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@revolunet
Copy link
Author

CLA signed

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@zpao
Copy link
Member

zpao commented Jun 8, 2015

Are there any other <video> related markup DOM properties/attributes that can also be added? #2094 attempted to add some (and some non-markup related ones which is why it didn't get off the ground).

@revolunet
Copy link
Author

yes, if you're okay i can add volume, kind, default, playbackRate

(default indicates if its the default subtitle)

@syranide
Copy link
Contributor

syranide commented Jun 9, 2015

http://www.w3.org/TR/html-markup/video.html#video-attributes
http://www.w3.org/TR/html-markup/track.html#track-attributes

I'm pretty sure all of these have to be MUST_USE_ATTRIBUTE too.

@revolunet
Copy link
Author

@syranide : thanks, can you please explain the implication of MUST_USE_ATTRIBUTE ? cant find any comment on this in the code

@zpao
Copy link
Member

zpao commented Jun 9, 2015

By default React does node.property = newValue. However that doesn't work for everything and for some you must actually do node.setAttribute('name', newValue). MUST_USE_ATTRIBUTE tells React to do the latter here. The inverse is also true where some must be set with the property and will never work with the attribute so we specify MUST_USE_PROPERTY. https://github.com/facebook/react/blob/master/src/renderers/dom/shared/DOMProperty.js#L22-L61 has some comments about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants