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

serialize/deserialize CSSOM.StyleSheet <> JSON #85

Closed
pyramation opened this issue Dec 20, 2016 · 1 comment
Closed

serialize/deserialize CSSOM.StyleSheet <> JSON #85

pyramation opened this issue Dec 20, 2016 · 1 comment

Comments

@pyramation
Copy link

I have a use case to serialize the "state" of the CSSOM.Stylesheet, not sure if this would be something useful, but I have working a gist here that exports CSSOM2JSON and JSON2CSSOM:

https://gist.github.com/pyramation/3bafcff80a4fc41b04af8834a2a0d794

Is this something that I am unaware of that already exists? I wanted to be able to write out to a JSON, and then read it back in and have a legitimate CSSOM object to work with

@NV
Copy link
Owner

NV commented Jul 17, 2019

No, I'm unaware of anything like this.

If you're willing to implement toJSON method, I'm willing to take pull requests. I think it would make sense to add toJSON to StyleSheet and perhaps CSSRule.

@NV NV closed this as completed Jul 17, 2019
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