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

Inabox: Change use of includes within whitelist checking to indexOf. #20805

Merged

Conversation

zombifier
Copy link
Contributor

Apparently Array.prototype.includes is not being polyfilled within the host script. Not that it's beneficial to do so, but I initially assumed that this was the case and it wouldn't make a difference. But since it wasn't, as a result the host script would fail on old browsers (like on Android, where old Chrome versions are still rampant). This changes the use of includes() to the older indexOf() to ensure that it would work there.

ads/inabox/inabox-messaging-host.js Outdated Show resolved Hide resolved
@keithwrightbos keithwrightbos merged commit 5d7278c into ampproject:master Mar 5, 2019
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
…mpproject#20805)

* Inabox: Change includes (which is not being polyfilled) to indexOf.

* nit fix
bramanudom pushed a commit to bramanudom/amphtml that referenced this pull request Mar 22, 2019
…mpproject#20805)

* Inabox: Change includes (which is not being polyfilled) to indexOf.

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

Successfully merging this pull request may close these issues.

None yet

4 participants