[Webkit-unassigned] [Bug 17896] Inspector console should autocomplete the id's in the document when completing document.getElementById
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 15 09:07:07 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=17896
--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org> 2010-06-15 09:07:05 PST ---
Yes, worse, I was just doing getElementsByTagName("*") for my proof of concept. Your query is much better! But even that might be scanning the full document.
With that suggestion I can probably do the following:
getElementById => querySelectorAll("[id]")
getElementsByClassName => querySelectorAll("[class]")
getElementsByName => querySelectorAll("[name]")
getElementsByTagName => getElementsByTagName("*") + filter?
querySelector[All] => something fancy, like a mix of the above, #id, .class, tagName
I might take a look at:
- getElementsByTagNameNS => same as above but with namespaces?
- createElement[NS] => valid html types, namespaces?
- createEvent => valid event types
- maybe $ and $$ => getElementById && querySelectorAll
- addEventListener => event types? functions?
- removeEventListener => event types? functions?
Knowing the function you're writing into can be kind of
useful. You can decide only to return objects of a
particular type. So for the 2nd argument of addEventListener
you would want either functions, or object's with a
"handleEvent" property. Thats going a bit overkill
though.
By the way, a did do a quick balanced parenthesis check
so the following will at least let you know that the
function is "getElementById". I haven't played around
with what I want to do in this case.
document.getElementById( func() + |
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list