Issue 5764 #46

Merged
merged 5 commits into from Oct 3, 2012

2 participants

@sroussey
Firebug Working Group member

No description provided.

@simonlindholm simonlindholm and 1 other commented on an outdated diff Oct 2, 2012
extension/content/firebug/console/commandLine.js
{
- return Wrapper.unwrapObject(context.baseWindow.document).getElementById(id);
+ var result;
+ if (start && start.querySelector && (
+ start.nodeType == Node.ELEMENT_NODE ||
+ start.nodeType == Node.DOCUMENT_NODE ||
+ start.nodeType == Node.DOCUMENT_FRAGMENT_NODE)) {
+ return start.querySelector(selector);
+ }
+
+ result = Wrapper.unwrapObject(context.baseWindow.document).querySelector(selector);
+ if (result == null && (selector||"")[0] !== "#")
+ {
+ result = Wrapper.unwrapObject(context.baseWindow.document).querySelector("#" + selector);
@simonlindholm
Firebug Working Group member
simonlindholm added a line comment Oct 2, 2012
if (context.baseWindow.document.getElementById(selector))

seems better.

@sroussey
Firebug Working Group member
sroussey added a line comment Oct 2, 2012

That begs the question of whether these things need to be unwrapped at all or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@janodvarko janodvarko merged commit 7579ab2 into firebug:master Oct 3, 2012
@janodvarko
Firebug Working Group member

Thanks Steven!

Honza

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