Skip to content

Instances of HTMLElement does not expose the remove() function #2910

Closed
@wedneyyuri

Description

@wedneyyuri

Instances of HTMLElement don't have access to remove function.

I'm getting the following error:

Property 'remove' does not exist on type 'HTMLElement'.

Example:

var element = document.getElementById('myid');

(<HTMLElement>element).remove();

image

Interface ChildNode Reference

[NoInterfaceObject,
Exposed=Window]
interface ChildNode {
[Unscopeable] void before((Node or DOMString)... nodes);
[Unscopeable] void after((Node or DOMString)... nodes);
[Unscopeable] void replaceWith((Node or DOMString)... nodes);
[Unscopeable] void remove();
};
DocumentType implements ChildNode;
Element implements ChildNode;
CharacterData implements ChildNode;

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 issueRevisitAn issue worth coming back to

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions