Skip to content

specify return type for querySelector - #102

Merged
Zhengbo Li (zhengbli) merged 1 commit into
microsoft:masterfrom
YuichiNukiyama:fix8114
Jun 10, 2016
Merged

specify return type for querySelector#102
Zhengbo Li (zhengbli) merged 1 commit into
microsoft:masterfrom
YuichiNukiyama:fix8114

Conversation

@YuichiNukiyama

Copy link
Copy Markdown
Contributor

@mhegazy

Copy link
Copy Markdown
Contributor

👍

@zhengbli
Zhengbo Li (zhengbli) merged commit 8e1d612 into microsoft:master Jun 10, 2016
@zhengbli

Copy link
Copy Markdown

Thanks Yuichi Nukiyama (@YuichiNukiyama) !

@yuttie

Copy link
Copy Markdown

Yuichi Nukiyama (@YuichiNukiyama) Thanks for your great work.

I found I cannot select an SVGTitleElement (https://developer.mozilla.org/en-US/docs/Web/API/SVGTitleElement) by querying "title" with SVGSVGElement's querySelector(). I think the problem is related to this PR.

I think it would be nice if querySelector("title") returns a value of type HTMLTitleElement | SVGTitleElement.

How do you think?

@YuichiNukiyama

Copy link
Copy Markdown
Contributor Author

Yuta Taniguchi (@yuttie)
A good point. However, cast is necessary, so it is hard to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

querySelector return type could be more specific for single-element selectors

5 participants