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.

Noscript HTML support

See original GitHub issue

Currently it’s impossible to set HTML inside the noscript tag, as textContent is used for setting children. But for setting up GTM, it’d be great to also support their noscript setup:

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

Which atm gets escaped:

<noscript>
  &lt;iframe
    src=&quot;https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX&quot;
    height=&quot;0&quot;
    width=&quot;0&quot;
    style=&quot;display: none; visibility: hidden&quot;
  &gt;&lt;/iframe&gt;
</noscript>

Screenshot 2022-08-26 at 14 43 54

Another use-case could be someone wanting to render an image/gif in a noscript tag, which would also be impossible atm.

A workaround for now is using a dynamic component (credit to https://github.com/vuejs/vue/issues/8996#issuecomment-557926912):

<component is="noscript">
  <iframe
    :src="`https://www.googletagmanager.com/ns.html?id=${GOOGLE_TM_ID}`"
    height="0"
    width="0"
    style="display: none; visibility: hidden"
  ></iframe>
</component>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
MuhammadM1998commented, Dec 4, 2022

@harlan-zw I checked the source and you’re right. Thanks!

1reaction
andreasvirkuscommented, Oct 27, 2022

Thank you sir!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Noscript element - HTML: HyperText Markup Language
The <noscript> HTML element defines a section of HTML to be inserted if a script type on the page is unsupported or if...
Read more >
"noscript" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web ... HTML element: noscript....
Read more >
HTML <noscript> Tag - W3docs
The <noscript> tag has an alternative content displayed in the browsers not supporting scripts, or the browsers, where the user disables the script...
Read more >
HTML <noscript> Tag - GeeksforGeeks
The <noscript> tag in HTML is used to display the text for those browsers which does not support script tag or the browsers...
Read more >
4.3.2 The noscript element — HTML5: Edition for Web Authors
... head element of an HTML document, if there are no ancestor noscript elements. ... that don't support scripting, by affecting how the...
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