Is there a relative URL format for the link rel=stylesheet href=URL that works in both jsdom and browsers?

Skip to first unread message

Jonathan Pool

Jul 15, 2019, 4:55:07 PM7/15/19
to jsdom
If I include a link element with rel="stylesheet" href="styles.css", a browser finds and loads that CSS file. But jsdom does not.

If I insert "file://" before the filename, then jsdom finds and loads the CSS file. But the browser does not.

So what do I need to do? Must I include 2 link elements, one with each URL format?

I'm using jsdom 14.0.0.

Domenic Denicola

Jul 15, 2019, 4:56:55 PM7/15/19

Have you set the URL of your JSOM instance?

You received this message because you are subscribed to the Google Groups "jsdom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

Reply all
Reply to author
0 new messages