Skip to content

Use newer less verbose DOM functions #113517

Closed

Description

Some functions can be updated to be a bit simpler in vs/base/browser/dom.ts. As far as I can tell from the linked docs and running ./scripts/test.sh there doesn't seem to be any failures.

https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove
node.removeChild(node.firstChild) -> node.firstChild.remove()

https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected
isInDOM -> node.isConnected

https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append
children.forEach(child => parent.appendChild(child)) -> parent.append(...children)

Activity

  1. added
    engineering
    on Jan 5, 2021
  2. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 5, 2021
  3. locked and limited conversation to collaborators on Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

engineeringinsiders-released

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions