undom icon indicating copy to clipboard operation
undom copied to clipboard

🍩 1kb minimally viable DOM Document implementation

Results 16 undom issues
Sort by recently updated
recently updated
newest added

I'm trying to spy on `removeChild` in a test - I have a `parent` node being modified like this: ``` let removals = 0; let removeChild = parent.removeChild.bind(parent); parent.removeChild =...

I tried using this for a unit-test, and ran into some issues with e.g. `childNodes`, which in regular DOM is a [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) and not just an `Array`, which is missing,...

Would be cool to have "undom" published on deno.land (https://deno.land/x/undom) so it's easier to import in Deno. [Setup guide](https://dev.to/craigmorten/how-to-publish-deno-modules-2cg6)

Since [`DocumentFragment`](https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment) is pretty essential for some use cases(like [ef.js](https://github.com/TheNeuronProject/ef.js)) and it's included in the [DOM Level 3 specification](https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-B63ED1A3), should this be implemented in undom? I think it's a pretty...

This PR implements the following APIs: * [`Element.tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName) * [`Node.ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument) It will allow the following code to operate correctly: ```javascript import React from 'react'; import ReactDOM from 'react-dom'; import undom...

This speeds up the create test by about **25-30%** by avoiding the call to `util.assign()` in the `createDocument()` function. Instead of that `Document#document` is now an accessor on the prototype,...

Could there be a viable use case for using undom in the browser, to have a DOM-like API, but avoiding the performance cost of the real DOM? Suppose, for example,...

Currently, `elem.attributes` does not include the `style` attribute since that's stored as a separate object. See: https://github.com/developit/undom/blob/master/src/undom.js#L93-L95 This differs from my expectations. It also means that the provided `serializeHtml()` function...

One more thing is to add Attribute, which _should not_ inherit from `Node`, so this would be enough ```js class Attribute { constructor (name, value, ns) { this.nodeType = 2...