jsdom / cssstyle

A Node.js implementation of the CSS Object Model CSSStyleDeclaration interface
MIT License
109 stars 70 forks source link

`cssText` setter should not throw #30

Closed Joris-van-der-Wel closed 9 years ago

Joris-van-der-Wel commented 9 years ago

I don't think the spec explicitly states this, but it is how all the browsers seem to behave.

Try this:

node.style.cssText = 'color:';
node.style.cssText === '';

node.style.cssText = 'color: red/*';
node.style.cssText === '';

// etc
chad3814 commented 9 years ago

published version 0.2.27 with this fix