Skip to content

document.querySelector should have blur() method #10924

Closed
@paynoattn

Description

@paynoattn

TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)
1.8.1
Code

var myBlur = document.querySelector('.blur').blur();

Expected behavior:
No error should be thrown by the compiler.

Actual behavior:
Compiler throws following error:
Property blur does not exist on type Element.

This does not throw for document.getElementById, as document.getElementById is of type HTMLElement. document.querySelector is simply of type Element.

I believe that document.querySelector should be of type HTMLElement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions