Skip to content

DOMTokenList missing replace() function #22466

@lenovouser

Description

@lenovouser

https://github.com/Microsoft/TypeScript/blob/be1c11581e43098bcb6747af50f43b39c762be39/src/lib/dom.generated.d.ts#L3282-L3291

Code

const span    = document.querySelector("span");
const classes = span.classList;

try {
    classes.replace("orange", "apple");
    span.textContent = classes.toString();
} catch(e) {
    span.textContent = e;
}

Playground Link: typescriptlang.org/play

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions