-
Notifications
You must be signed in to change notification settings - Fork 866
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
Remove autoplay value, fixing compatibility with Safari macOS and iOS 11 #112
base: master
Are you sure you want to change the base?
Conversation
Autoplay is a boolean attribute, and Safari (both macOS and iOS 11 Safari) appears to choke if it is given a value. [The spec states](https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttr ibute#Example), counter-intuitively, that passing an _empty string_ as the `value` is the proper way to to define a boolean attribute as `true`: > Boolean attributes are considered to be true if they're present on the element at all, regardless of their actual value; as a rule, you should specify the empty string (`””`) in `value` (some people use the attribute's name; this works but is non-standard).
Upon further testing it appears Safari iOS continues to choke even with an empty attribute. Considering the attribute should be applied to the HTML element itself, there shouldn't be a need to add it programmatically.
Upon further testing it appears iOS 11 Safari continues to choke on the blank attribute, so I have removed it entirely. |
Hello! When your pull request will be in release? I want using component in IOS 11! |
Have you teste it and it works? |
It's working for me on iOS 11 Safari. |
Any progress on this? Thanks! |
Hello, @thegreatsunra Could you propose this PR to my fork, please? |
Btw if your |
Autoplay is a boolean attribute, and Safari (both macOS and iOS 11 Safari) appears to choke if it is given a value.
The spec states, counter-intuitively, that passing an empty string as the
value
is the proper way to to define a boolean attribute astrue
: