Skip to content

specify return type for querySelector #102

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

Merged
merged 1 commit into from
Jun 10, 2016

Conversation

YuichiNukiyama
Copy link
Contributor

@mhegazy
Copy link
Contributor

mhegazy commented May 3, 2016

👍

@zhengbli zhengbli merged commit 8e1d612 into microsoft:master Jun 10, 2016
@zhengbli
Copy link
Contributor

Thanks @YuichiNukiyama !

@YuichiNukiyama YuichiNukiyama deleted the fix8114 branch June 10, 2016 23:24
@yuttie
Copy link

yuttie commented Jul 9, 2017

@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
Contributor Author

@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