developit / undom

🍩 1kb minimally viable DOM Document implementation
https://npm.im/undom
MIT License
668 stars 25 forks source link

Outline goals and/or non-goals #1

Open jfsiii opened 8 years ago

jfsiii commented 8 years ago

document.createElement('foo') doesn't exist in a vacuum. Outline what is, and is not, in scope. This would clarify what's meant by minimally viable and save a lot of back-and-forth in issues/PRs.

If a list of criteria/props isn't desired, a paragraph or two on why this was created the purpose it serves would be educational.

e.g. should this work with d3, jQuery, cheerio, etc? Which DOM props/attrs are supported and why? Same for unsupported props/attrs (e.g. style, on*, etc).

developit commented 8 years ago

@jfsiii good idea. My initial use-case was to serve the very basic needs of Preact, and I published this because there are other libraries out there that interface with the DOM in a similarly minimal way.

Events are an interesting case, since I think that would be useful for people looking to run tests on top of a minimal DOM implementation.

I think in terms of intended scope, I just want to avoid bundling a parser and even avoid building in a serliazer. Everything else would be fair game as long as it stays super small. I'm looking at dropping the constants since they add little value.

jfsiii commented 8 years ago

Thanks. Size is a great constraint. Especially if it's possible for others to extend/decorate with their desired features.

developit commented 8 years ago

Exactly. That'd be the goal with HTML parsing / serialization - allow them to be added, but don't ship them by default.