Skip to content

getElementsByClassName isn't implemented on typeof Element #4401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LPGhatguy opened this issue Aug 21, 2015 · 5 comments
Closed

getElementsByClassName isn't implemented on typeof Element #4401

LPGhatguy opened this issue Aug 21, 2015 · 5 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@LPGhatguy
Copy link
Contributor

MDN leads me to believe that getElementsByClassName should be a valid member of any Element (and every browser I've tested leads me to the same conclusion).

Here's the source documentation that I'm trying to write an application using.

I've tested this with TypeScript 1.5.3 (via the ST plugin's language services) and the latest 1.6-dev.

@mhegazy
Copy link
Contributor

mhegazy commented Aug 21, 2015

@zhengbli can you take a look?

@mhegazy mhegazy added Bug A bug in TypeScript Suggestion An idea for TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Aug 21, 2015
@saschanaz
Copy link
Contributor

Related to #3220?

@zhengbli
Copy link
Contributor

It is a spec error. Indeed the getElementsByClassName should be defined in Element instead of HTMLElement.

@mhegazy mhegazy removed the Suggestion An idea for TypeScript label Aug 21, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Aug 21, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Aug 21, 2015
@S-YOU
Copy link

S-YOU commented Aug 22, 2015

I am not sure typescript support IE8, but as far as I remembered, it doesn't have on every element, but on document.

@LPGhatguy
Copy link
Contributor Author

There's no issue targeting IE8 even with typing definitions from modern browsers -- not having the definitions simply makes targeting browsers released in the past 6 years more difficult.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

5 participants