montagejs / minidom Goto Github PK
View Code? Open in Web Editor NEWSmall Javascript DOM level 1 implementation
License: Other
Small Javascript DOM level 1 implementation
License: Other
Hey,
That's from DOM 2, but having localName
available (even if as an alias to tagName
) would make Minidom compatible with the Xpath library out of the box. I think. :-)
Is anyone aware of a minidom extension that supports createRange?
Is there interest in adding it to minidom?
Or should I simply create a package that depends on minidom and extends it?
Is it currently possible?
When running some tests, I ran into an issue parsing a trivial DOM on Node 0.12, which was resolved by backtracking to Node 0.10. The issue manifested as an "unable to set length" error for a property that only has a getter. The trace originates at Array.prototype.slice.call(this._childNodes, &c in insertBefore.
var minidom = require("minidom");
var document = minidom("<html><body>.</body>\n\n\n</html>");
var html = document.documentElement;
var head = html.firstChild;
var body = head.nextSibling;
expect(body.innerHTML).toBe("."); // actual ".\n\n\n"
e.g., document.createTextNode("…")
might be interpreting the entity instead of encoding. not sure. But there is definitely a difference in behavior between minidom and browser dom
in my usage at least.
from @kriskowal
I'm trying to run in the browser.
this fails because it can't splice it.
How would you keep a history of changes in a minidom?
appendChild
, etc.)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.