Skip to content
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

Id attributes should become global JS variables #12853

Closed
pygy opened this issue Aug 13, 2016 · 2 comments
Closed

Id attributes should become global JS variables #12853

pygy opened this issue Aug 13, 2016 · 2 comments

Comments

@pygy
Copy link

@pygy pygy commented Aug 13, 2016

I suppose the problem is well known, but I couldn't find an issue about it. Each id attribute defined on an element should create a JS global pointing to the element:

<!doctype html>
<title>Id attribute should be available as JS globals</title>
<p id="foo">This should be replaced by the script below.<p>
<script>
if(typeof foo !== "undefined")
    foo.innerHTML="Sucessfully updated by setting <code>foo.innerHTML</code>."
</script>

Live here

@nox
Copy link
Member

@nox nox commented Aug 13, 2016

Closing as duplicate of #8984, but thanks for filing the issue anyway!

@nox nox closed this Aug 13, 2016
@pygy
Copy link
Author

@pygy pygy commented Aug 13, 2016

Great, I couldn't find it (lack of specialized vocabulary).

Good to know it is indeed on the radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.