DEV Community

Discussion on: StyleSheet Internals

Collapse
 
harveysanders profile image
Harvey Sanders

What was the DOM exception thrown if you didn't use the try/catch?

Collapse
 
jwp profile image
John Peters • Edited

Uncaught DOMException: Failed to read the 'rules' property from 'CSSStyleSheet': Cannot access rules.

Collapse
 
harveysanders profile image
Harvey Sanders

Ah looks like because of a CORS violation. I didn't know realize this would throw an error until tofsy. Thanks!
stackoverflow.com/questions/487536...

Thread Thread
 
jwp profile image
John Peters

Thanks for posting link. FYI later today I'm posting this solution to GitHub. I'll let you know.