Giter Club home page Giter Club logo

Comments (7)

frank06 avatar frank06 commented on August 27, 2024

Ah, bummer...

Even without indentation, it should be feasible. I believe my usecase (parse/modify/serialize) is common enough to justify having this.

At the moment I can't even inspect it:

var p = CSSOM.parse("body {color: black}")
console.dir(p)

...I get

TypeError: Array.prototype.toString is not generic
    at CSSStyleDeclaration.toString (native)
    at String.STRING_ADD_LEFT (native)
    at isRegExp (sys)
    at format (sys:155:11)
    at sys:186:19
    at Array.map (native)
    at format (sys:162:23)
    at sys:186:19
    at Array.map (native)
    at format (sys:162:23)

from cssom.

NV avatar NV commented on August 27, 2024

I can't reproduce TypeError: Array.prototype.toString is not generic in Chrome 9.0.587.0 dev, Safari 5.0.2 (6533.18.5) and Firefox 4.0b6. What browser do you use?

from cssom.

frank06 avatar frank06 commented on August 27, 2024

Ah, sorry. Using it in node.js (weird, should behave like Chrome - but i don't know which V8 versions they're running).

from cssom.

NV avatar NV commented on August 27, 2024

I see. I'll get reed of __proto__ so it will be fixed soon. It might be a node.js REPL's bug, though.

from cssom.

frank06 avatar frank06 commented on August 27, 2024

When you fix it, would this output the serialized CSS tree – or just 'don't break'?

By the way, I got the is not generic bug calling the library in a program, not the REPL.

from cssom.

NV avatar NV commented on August 27, 2024

CSSStyleSheet.toString has been landed. Try it on demo page.

Node.js bug should be fixed as well. 0eb3d4e. No idea what was causing it.

from cssom.

frank06 avatar frank06 commented on August 27, 2024

Wow, excellent, thanks! I'll let you know how it goes.

from cssom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.