mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 00:42:33 +00:00
With `Options::e4x` set, vectorcraft-js runs ECMA-357 (2nd edition): XML and XMLList literals with embedded expressions, the `..`, `.@`, `.*`, `.()` and `::` selectors, assignment and `delete` on selected nodes, `for each`, `default xml namespace`, and the four objects with their methods and settings. The option is off by default, and without it the syntax and globals do not exist. Parsing, serializing, comparing and copying trees use no native stack, and each takes fuel and counts against the heap limit. Inserting a node into itself or its descendants throws a TypeError before the tree changes. A literal or XML string nested past `Options::max_depth` gives a SyntaxError, and a tree built past that depth stops at the heap limit. `XML.prototype.xpath` is not provided.