3 ms·
As soon as someone writes a Javascript interpreter in Wuffs..
by warkdarrior 2y ago
As soon as someone writes a Javascript interpreter in Wuffs..
- jchw 2y agoDo you ever need a JS interpreter to parse a PDF? That's horrifying. I understand PDF has a bunch of limbs, but I always assumed the JS stuff was at least separate from the parsing. (I am familiar with the PDF format at a lower level but I never touched any of the weird features.)
- timschmidt 2y agoI wrote an SVG that's all javascript, no elements. All the graphics are generated dynamically at runtime by the javascript. It's SVG standards compliant, but only opens correctly in browsers, not in inkscape or other desktop publishing apps. I work a lot in OpenSCAD, and had a need to design some custom graph paper. So I found the subset of SVG which was similar to OpenSCAD. :)
- jszymborski 2y agoFrankly, I wouldn't begrudge a website for not correctly parsing an svg I composed entirely with javascript. It's annoying you can't just "flatten" or "bake" such an svg like yours into one composed entirely of elements (unless one exists?)
- csande17 2y agoOften you can open the SVG in a browser and then use the developer tools to copy out the resulting nodes as "flat" SVG source code. Chrome even includes a --dump-dom flag you can use to do this on the command line, although I haven't tested it with an SVG.
- jszymborski 2y agoClever!