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

Replace document.write with appendChild method #1736

Closed
wants to merge 1 commit into from

Conversation

JohnGemstone
Copy link

As per issue #1600 Chrome browsers throw a violation warning in the console when document.write is used for injecting elements.
Using the 'appendChild' method to inject the script tag mitigates the violation.

Violation reference:
https://developers.google.com/web/updates/2016/08/removing-document-write

As per issue BrowserSync#1600 Chrome browsers throw a violation warning in the console when `document.write` is used for injecting elements.
Using the 'appendChild' method to inject the script tag mitigates the violation.

Violation reference:
https://developers.google.com/web/updates/2016/08/removing-document-write
@Boscop
Copy link

Boscop commented Mar 6, 2020

Any update on this? :)

@crlang44
Copy link

Looks like this might just need to have the CI run again?

@einomi
Copy link

einomi commented Nov 2, 2020

Any update on this?

@crlang44
Copy link

crlang44 commented Nov 3, 2020

I can approve but I don't have write access to the repo so it doesn't do anything, merging is still blocked.

@glen-84
Copy link
Contributor

glen-84 commented Apr 20, 2021

@shakyShane Are you able to review this?

@simonmaass
Copy link

why is this not getting merged?

@the0neWhoKnocks
Copy link

Looks like @shakyShane has merge rights, perhaps they can help. Or at least nudge someone that can.

Copy link

@the0neWhoKnocks the0neWhoKnocks left a comment

Choose a reason for hiding this comment

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

One thing here. script should be a const since it's not being set again.

Or perhaps use var instead, if support for older browsers is a concern. For example if folks have a mobile device test shelf wired up via BS, using let or const could be a breaking change if they have a hard requirement to support older devices.

@glen-84
Copy link
Contributor

glen-84 commented Mar 5, 2023

@shakyShane I think you can close this now. (#2019)

@shakyShane
Copy link
Contributor

@JohnGemstone thanks for the original PR, it's all fixed up in the latest version though :)

@shakyShane shakyShane closed this Mar 5, 2023
@JohnGemstone JohnGemstone deleted the patch-1 branch March 6, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants