Skip to content
New issue

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

"elem.attributes" should include "style" attribute #11

Open
feross opened this issue Aug 23, 2017 · 3 comments
Open

"elem.attributes" should include "style" attribute #11

feross opened this issue Aug 23, 2017 · 3 comments

Comments

@feross
Copy link

feross commented Aug 23, 2017

Currently, elem.attributes does not include the style attribute since that's stored as a separate object. See: https://github.com/developit/undom/blob/master/src/undom.js#L93-L95

This differs from my expectations. It also means that the provided serializeHtml() function doesn't include inline styles without modification.

Update: also, elem.style.cssText returns an object when a string is expected. Is this level of DOM compliance out-of-scope for undom or is this a reasonable expectation?

@developit
Copy link
Owner

Whoops, this slipped through the cracks.

I think it would make most sense for undom to treat style as a non-special attribute like any other.

@feross
Copy link
Author

feross commented Jan 27, 2018

@developit I think that would work for me.

@developit
Copy link
Owner

Would help cut down on size too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants