Skip to content

Google Feedback on 4.4 Beta #1067

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Opening on the behalf of @h-joo from microsoft/TypeScript#45047:

Readonly attributes in DOMPoint, DOMMatrix, DOMRect

Some properties of DOMPoint, DOMMatrix, DOMRect became readonly, and this no
longer match the specification. This is because these types no longer override
properties from the extended types to be read/write.

Compare(DOMPoint):

Compare(DOMMatrix):

Compare(DOMRect):

Removed Types

SpeechRecognition, RTCError got removed from lib.dom.d.ts. There are existing
code which use this API, and it would be difficult to migrate without proper
type support either from the compiler or from definitelyTyped.

Offscreen Rendering API changes

OffscreenCanvas still exists, but it's marked as deprecated. Though it is no
longer a value, i.e. code calling new OffscreenCanvas no longer works, it's
just an interface. We think this might be unintentional. Though, we would still
be able to migrate via referring to the types defined in
DefinitelyTyped.

ShadowRoot interface changes

ShadowRoot is a subtype of DocumentFragment. DocumentFragment has a
getElementById which returns HTMLElement. In 4.4-beta, DocumentFragment no
longer defines its own getElementById method, meaning
HTMLElement.prototype.shadowRoot.getElementById returns Element, not
HTMLElement. This causes hundreds of breakages of code using shadowRoot.

ChildNode interface changes

In 4.4, ChildNode no longer extends Node. This seems like a bug.

DocumentOrShadowRoot interface changes

DocumentOrShadowRoot no longer has getSelection, elementFromPoint,
elementsFromPoint, caretFromRange. We also couldn't find in the repo whether
this was intentional or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions