microsoft / microsoft/TypeScript
Provide lib for modern DOM
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
This is basically a re-opening of #2910, which @mhegazy asked me to do.
Nowadays TS has the lib compiler option that allow users to selectively choose which core definitions to include or not based on their target.
It would be nice to add a new option similar to dom and dom.iterable for users targetting a modern DOM runtime. Not sure how to name this since W3C has moved from releases to a "living standard" model.
For example, the living standard includes interfaces ChildNode with methods after, before, remove and replaceWith; ParentNode with methods prepend and append.
Those methods have been in Firefox and Chrome for a long while, they're in preview in Edge (17035+).
They are very convenient and there's no reason a dev that targets modern browsers shouldn't be able to do "lib": "dom.living" and use them.
Unfortunately I am not sure if there's a list somewhere of all those new features... except going through the whole standard :(
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by determining the complete set of modern DOM features to include and how a new selectable lib should be named alongside "dom" and "dom.iterable". The issue mentions ChildNode and ParentNode methods as examples, but no files or tests are identified. Done means users can select the new lib and use the intended modern DOM definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100