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

🐛Change toggleAttribute to set/removeAttribute #28472

Merged
merged 11 commits into from
May 19, 2020

Conversation

mszylkowski
Copy link
Contributor

@mszylkowski mszylkowski commented May 18, 2020

toggleAttribute is not widely supported so it fails on multiple platforms (iOS <=11, various Android)

Switched to using setAttribute and RemoveAttribute.

Resolves #28463

@amp-owners-bot amp-owners-bot bot requested a review from gmajoulet May 18, 2020 16:56
@amp-owners-bot
Copy link

amp-owners-bot bot commented May 18, 2020

Hey @gmajoulet, @newmuis, @Enriqe! These files were changed:

extensions/amp-story/1.0/amp-story-affiliate-link.js
extensions/amp-story/1.0/amp-story.js

Copy link
Member

@cramforce cramforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it isn't widely supported should we ban Element.prototype.toggleAttribute as in #27943?

@gmajoulet
Copy link
Contributor

That's a good idea since it shows as supported on iOS, even tho it's only for 13.3 and above

@mszylkowski
Copy link
Contributor Author

Added toggleElement to the list of banned attributes, and updated the calls

@mszylkowski mszylkowski changed the title 🐛Change muted attribute to set/removeAttribute 🐛Change toggleAttribute to set/removeAttribute May 18, 2020
@mszylkowski mszylkowski merged commit 43be2c2 into ampproject:master May 19, 2020
@mszylkowski mszylkowski deleted the add_muted_attribute branch June 1, 2020 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants