1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 15:22:26 +01:00

Get rid of most remaining comprehensions.

This commit is contained in:
Kris Maglione
2015-12-20 15:53:43 -08:00
parent 0aba8fb619
commit 916ea412a5
34 changed files with 372 additions and 256 deletions

View File

@@ -1153,13 +1153,13 @@ var Aardvark = Class("Aardvark", {
// valid selectable element
findValidElement: function findValidElement(elem) {
for (; elem; elem = elem.parentNode) {
if (Set.has(this.alwaysValidElements, elem.localName))
if (hasOwnProperty(this.alwaysValidElements, elem.localName))
break;
let { display } = DOM(elem).style;
if (Set.has(this.validIfBlockElements, elem.localName) && display == "block")
if (hasOwnProperty(this.validIfBlockElements, elem.localName) && display == "block")
break;
if (Set.has(this.validIfNotInlineElements, elem.localName) && display != "inline")
if (hasOwnProperty(this.validIfNotInlineElements, elem.localName) && display != "inline")
break;
}
return elem;