question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Violation] Avoid using document.write()

See original GitHub issue

This is coming from:

    if (doc.body.children.length < 1) {
         doc.open('text/html', 'replace');
         doc.write(this.props.initialContent);
         doc.close();
    }

In Firefox this is an error and the frame won’t load: DOMException: "The operation is insecure."

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ryanseddoncommented, Apr 20, 2021

v5 is now the latest release

1reaction
ryanseddoncommented, Apr 16, 2021

Hey @anthonyxiques

No worries I think it has sat enough for me to push out a new major release, I assume you’ve tested your implementation with the alpha release and it all works as expected?

Would like to contribute toward cost of your time to make that happen - let me know if that is a possibility 🙏

I’ve been meaning to setup the sponsor feature for a while now so maybe when that’s done you can donate me a coffee!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoid using document.write() occurs when trying to load a ...
The violation message is caused by browserSync that will add the following line to the document. ... [CDATA[ document.write("<script async ...
Read more >
Uses document.write() - Chrome Developers
[Violation] Avoid using document.write(). In the Firefox DevTools Console you'll see this message: An unbalanced tree was written using document ...
Read more >
Avoid Using Document.Write: What Is It and Why You Should ...
Accelerated web pages: Research by Chrome underlines how harmful Document.Write can be to the performance of websites. A test by Chrome revealed ...
Read more >
Why you should avoid using document.write, specifically for ...
Generally, you should avoid the use of blocking JavaScript. “Defer” and “async” attributes will let you invoke external scripts asynchronously.
Read more >
[Violation] Avoid using document.write(). - WordPress.org
Hello, the plugin does not use document. write for any client-side function. However, it can warn you if you are using a code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found