We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
script
Hi, guys. I want to get <script /> tag attrs such as src, but it always get undefined.
<script />
src
undefined
For example code below this:
var http = require("http"); const {DOMParser, parseHTML} = require('linkedom'); // Standard way: text/html, text/xml, image/svg+xml, etc... // const document = (new DOMParser).parseFromString(html, 'text/html'); // Simplified way for HTML const { // note, these are *not* globals window, document, customElements, HTMLElement, Event, CustomEvent // other exports .. } = parseHTML(` <!doctype html> <html lang="en"> <head> <script type="module" crossorigin="" src="js/index-d2f678de.js"></script> // <------ script tag <title>Hello SSR</title> </head> <body> <form> <input name="user"> <button> Submit </button> </form> </body> </html> `); const $scripts = document.querySelectorAll( 'script',) console.log($scripts[0].src,$scripts[0].type); // undefined, undefined
The text was updated successfully, but these errors were encountered:
PR welcome for this file which indeed has nothing special ... feel free to see how to add extra special accessors to an element
Sorry, something went wrong.
#144 Thanks
HTMLAnchorElement
pathname
No branches or pull requests
Hi, guys. I want to get
<script />
tag attrs such assrc
, but it always getundefined
.For example code below this:
The text was updated successfully, but these errors were encountered: