Closed Bug 867699 Opened 7 years ago Closed Last year

Allow regular expressions for attribute name in find-by-attribute


(Other Applications :: DOM Inspector, enhancement)

Not set


(Not tracked)



(Reporter: crussell, Unassigned)


(Colby Russell :crussell wrote in comment #4)
> Comment on attachment 744079 [details] [diff] [review]
> Proposed patch
> Review of attachment 744079 [details] [diff] [review]:
> -----------------------------------------------------------------
> ::: resources/content/viewers/dom/dom.js
> @@ +953,5 @@
> >  
> >      return aWalker.currentNode &&
> >             aWalker.currentNode.nodeType == nsIDOMNode.ELEMENT_NODE &&
> > +           aWalker.currentNode.hasAttribute(this.mFindParams[0]) &&
> > +           re.test(aWalker.currentNode.getAttribute(this.mFindParams[0]));
> Weird that we allow regular expressions everywhere else except this field's
> value for this type of search...

1. Open a page with elements containing on* event listener attributes (onload, et cetera).  Use this page, for example.
2. Open the find dialog and switch to search by attribute.
3. Type "^on" in the name field and leave the value blank.
4. Search.

Expected results:
Search iterates through all nodes containing on* event listener attributes.  As of this writing, the body element has an onload attribute, so it should stop there first if you tried it on this page.

Actual results:
No matches.  "End of document reached".
Oops! Wrong tab
Bulk close. This component is no longer supported or maintained.
Closed: Last year
Resolution: --- → INCOMPLETE
Bulk close. This component is no longer supported or maintained.
You need to log in before you can comment on or make changes to this bug.