Is it possible to insert script tag using content property of CSS?
The example below inserts plain text instead of a html tag
#someDiv:before {
content:"<script>$(function(){ console.log('test');});</script>";
}
Content inserted with the content
property will only ever be plain text. This is to prevent recursion. It also helps by preventing people from doing crazy things like inserting script
elements with CSS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With