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.

possible to add attributes to injected style tag?

See original GitHub issue

I need to pass an id attribute to the injected style tag so that I can access the CSS later on. Is it possible to add this functionality? It could be generic and support any number of attribute via some object passed into inject options…

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Anidetrixcommented, May 29, 2020

@redonkulus I’m glad, good luck with your work! Closing this issue then, can be reopened if needed.

0reactions
redonkuluscommented, May 27, 2020

@Anidetrix tried it locally and it works great! thanks for the quick turnaround, really helped me out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Extra Attributes to Style and Script Tags in Wordpress
A reusable method for adding arbitrary extra HTML attributes to enqueued styles and scripts in WordPress, using add_data and filters.
Read more >
Can an injection attack be pulled off using an HTML element's ...
Any attribute value can be simply chopped to parts by adding quotes, i.e. you can terminate the style attribute, and even the tag...
Read more >
Add ID's to <style> tags · Issue #216 · webpack ... - GitHub
It is kind of frustrating to be able to add only "static values" to the attributes of the injected <style> elements.
Read more >
Inject New CSS Rules - JavaScript
If you need to change the style of an element with JavaScript, ... You'll need to inject a new <style> element onto the...
Read more >
html-webpack-inject-attributes-plugin - npm
add custom attributes to inject script and link. Latest version: 1.0.6, last published: 2 years ago.
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