One way binding

This commit is contained in:
Gaël Métais
2015-03-09 10:37:00 +01:00
parent 2827463b41
commit 714cb318a9
3 changed files with 67 additions and 83 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
<div class="offenderButton" ng-class="{opens: obj.tree}">
<span ng-if="obj.type == 'html' || obj.type == 'body' || obj.type == 'head' || obj.type == 'window' || obj.type == 'document' || obj.type == 'fragment'"><b>{{obj.type}}</b></span>
<span ng-if="obj.type == 'domElement'">DOM element <b>{{obj.element}}</b></span>
<span ng-if="obj.type == 'fragmentElement'">Fragment element <b>{{obj.element}}</b></span>
<span ng-if="obj.type == 'createdElement'">Created element <b>{{obj.element}}</b></span>
<span ng-if="obj.type == 'html' || obj.type == 'body' || obj.type == 'head' || obj.type == 'window' || obj.type == 'document' || obj.type == 'fragment'"><b>{{::obj.type}}</b></span>
<span ng-if="obj.type == 'domElement'">DOM element <b>{{::obj.element}}</b></span>
<span ng-if="obj.type == 'fragmentElement'">Fragment element <b>{{::obj.element}}</b></span>
<span ng-if="obj.type == 'createdElement'">Created element <b>{{::obj.element}}</b></span>
<span ng-if="obj.type == 'notAnElement'">Incorrect element</span>
<dom-tree ng-if="obj.tree" tree="obj.tree"></dom-tree>
</div>
+2 -2
View File
@@ -2,8 +2,8 @@
<span ng-if="context.length == 0" class="offenderButton">Empty jQuery object</span>
<span ng-if="context.length == 1"><dom-element-button obj="context.elements[0]"></dom-element-button></span>
<span ng-if="context.length > 1">
{{context.length}} elements
{{::context.length}} elements
(<dom-element-button obj="context.elements[0]"></dom-element-button>, <dom-element-button obj="context.elements[1]"></dom-element-button>
<span ng-if="context.length > 2">and {{context.length - 2}} more...</span>)
<span ng-if="context.length > 2">and {{::context.length - 2}} more...</span>)
</span>
</span>
+61 -77
View File
@@ -79,20 +79,20 @@
showingDetails: node.showDetails,
jsError: node.error,
windowPerformance: node.windowPerformance
}" id="line_{{$index}}">
}" id="line_{{::$index}}">
<div class="index">{{$index + 1}}</div>
<div class="index">{{::$index + 1}}</div>
<div class="type">
{{node.data.type}}
{{::node.data.type}}
<js-children node="node"></js-children>
</div>
<div class="value">
<span ng-if="node.data.type == 'getElementById' || node.data.type == 'createElement'">
<b>{{node.data.callDetails.arguments[0]}}</b>
<b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="node.data.type == 'getElementsByClassName' || node.data.type == 'getElementsByTagName' || node.data.type == 'querySelector' || node.data.type == 'querySelectorAll'" class="offenders">
<b>{{node.data.callDetails.arguments[0]}}</b> on <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button>
<b>{{::node.data.callDetails.arguments[0]}}</b> on <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button>
</span>
<span ng-if="node.data.type == 'appendChild'" class="offenders">
<dom-element-button obj="node.data.callDetails.arguments[0]"></dom-element-button> appended to <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button>
@@ -100,65 +100,58 @@
<span ng-if="node.data.type == 'insertBefore'" class="offenders">
insert <dom-element-button obj="node.data.callDetails.arguments[0]"></dom-element-button> in <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button> before <dom-element-button obj="node.data.callDetails.arguments[1]"></dom-element-button>
</span>
<span ng-if="node.data.type == 'createTextNode' || node.data.type == 'createDocumentFragment'">
</span>
<span ng-if="node.data.type == 'addEventListener'" class="offenders">
<b>{{node.data.callDetails.arguments[0]}}</b> bound to <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button>
<b>{{::node.data.callDetails.arguments[0]}}</b> bound to <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button>
</span>
<span ng-if="node.data.type == 'jQuery loaded' || node.data.type == 'jQuery version change'">
{{node.data.callDetails.arguments[0]}}
{{::node.data.callDetails.arguments[0]}}
</span>
<span ng-if="node.data.type == 'jQuery - onDOMReady' || node.data.type == 'jQuery - windowOnLoad'">
(function)
</span>
<span ng-if="node.data.type == 'jQuery - Sizzle call'" class="offenders">
<b>{{node.data.callDetails.arguments[0]}}</b>
<b>{{::node.data.callDetails.arguments[0]}}</b>
<span ng-if="node.data.callDetails.context.elements[0].type != 'document'"> on <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button></span>
</span>
<span ng-if="node.data.type == 'jQuery - find'" class="offenders">
<b>{{node.data.callDetails.arguments[0]}}</b>
<b>{{::node.data.callDetails.arguments[0]}}</b>
<span ng-if="node.data.callDetails.context"> on <dom-element-button obj="node.data.callDetails.context.elements[0]"></dom-element-button></span>
</span>
<span ng-if="node.data.type == 'jQuery - html'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0] != undefined">set content "<b>{{node.data.callDetails.arguments[0]}}</b>" to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[0] != undefined">set content "<b>{{::node.data.callDetails.arguments[0]}}</b>" to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[0] == undefined">get content from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
</span>
<span ng-if="node.data.type == 'jQuery - append'" class="offenders">
append <b>{{node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
append <b>{{::node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{::node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{::node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - appendTo'" class="offenders">
append <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> to {{node.data.callDetails.arguments[0]}}
append <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> to {{::node.data.callDetails.arguments[0]}}
</span>
<span ng-if="node.data.type == 'jQuery - prepend'" class="offenders">
prepend <b>{{node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
prepend <b>{{::node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{::node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{::node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - prependTo'" class="offenders">
prepend <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> to {{node.data.callDetails.arguments[0]}}
prepend <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> to {{::node.data.callDetails.arguments[0]}}
</span>
<span ng-if="node.data.type == 'jQuery - before'" class="offenders">
insert <b>{{node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> before <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
insert <b>{{::node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{::node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{::node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> before <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - insertBefore'" class="offenders">
insert <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> before {{node.data.callDetails.arguments[0]}}
insert <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> before {{::node.data.callDetails.arguments[0]}}
</span>
<span ng-if="node.data.type == 'jQuery - after'" class="offenders">
insert <b>{{node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> after <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
insert <b>{{::node.data.callDetails.arguments[0]}}</b><span ng-if="node.data.callDetails.arguments[1]">, <b>{{::node.data.callDetails.arguments[1]}}</b></span><span ng-if="node.data.callDetails.arguments[2]">, <b>{{::node.data.callDetails.arguments[2]}}</b></span><span ng-if="node.data.callDetails.arguments[3]">, <b>and more...</b></span> after <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - insertAfter'" class="offenders">
insert <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> after {{node.data.callDetails.arguments[0]}}
insert <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> after {{::node.data.callDetails.arguments[0]}}
</span>
<span ng-if="node.data.type == 'jQuery - remove'" class="offenders">
remove <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="node.data.callDetails.arguments[0] != undefined"> filtered by <b>{{node.data.callDetails.arguments[0]}}</b></span>
remove <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="node.data.callDetails.arguments[0] != undefined"> filtered by <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - detach'" class="offenders">
detach <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="node.data.callDetails.arguments[0] != undefined"> filtered by <b>{{node.data.callDetails.arguments[0]}}</b></span>
detach <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="node.data.callDetails.arguments[0] != undefined"> filtered by <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - empty'" class="offenders">
empty <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
@@ -167,34 +160,34 @@
clone <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - replaceWith'" class="offenders">
replace <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> with <b>{{node.data.callDetails.arguments[0]}}</b>
replace <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> with <b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="node.data.type == 'jQuery - replaceAll'" class="offenders">
replace <b>{{node.data.callDetails.arguments[0]}}</b> with <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
replace <b>{{::node.data.callDetails.arguments[0]}}</b> with <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - text'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0] != undefined">set text "<b>{{node.data.callDetails.arguments[0]}}</b>" to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[0] != undefined">set text "<b>{{::node.data.callDetails.arguments[0]}}</b>" to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[0] == undefined">get text from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
</span>
<span ng-if="node.data.type == 'jQuery - wrap' || node.data.type == 'jQuery - wrapAll'" class="offenders">
wrap <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> with <b>{{node.data.callDetails.arguments[0]}}</b>
wrap <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> with <b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="node.data.type == 'jQuery - wrapInner'" class="offenders">
wrap the content of <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> with <b>{{node.data.callDetails.arguments[0]}}</b>
wrap the content of <jquery-context-button context="node.data.callDetails.context"></jquery-context-button> with <b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="node.data.type == 'jQuery - unwrap'" class="offenders">
unwrap <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - css' || node.data.type == 'jQuery - attr' || node.data.type == 'jQuery - prop'" class="offenders">
<span ng-if="isStringOfObject(node.data.callDetails.arguments[0])">set <b>{{node.data.callDetails.arguments[0]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="isStringOfObject(node.data.callDetails.arguments[0])">set <b>{{::node.data.callDetails.arguments[0]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="!isStringOfObject(node.data.callDetails.arguments[0])">
<span ng-if="node.data.callDetails.arguments[1] == undefined">get <b>{{node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[1] != undefined">set <b>{{node.data.callDetails.arguments[0]}}</b> : <b>{{node.data.callDetails.arguments[1]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[1] == undefined">get <b>{{::node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[1] != undefined">set <b>{{::node.data.callDetails.arguments[0]}}</b> : <b>{{::node.data.callDetails.arguments[1]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
</span>
</span>
<span ng-if="node.data.type == 'jQuery - offset' || node.data.type == 'jQuery - height' || node.data.type == 'jQuery - innerHeight' || node.data.type == 'jQuery - outerHeight' || node.data.type == 'jQuery - width' || node.data.type == 'jQuery - innerWidth' || node.data.type == 'jQuery - outerWidth' || node.data.type == 'jQuery - scrollLeft' || node.data.type == 'jQuery - scrollTop'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0] == undefined">get from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[0] != undefined">set <b>{{node.data.callDetails.arguments[0]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
<span ng-if="node.data.callDetails.arguments[0] != undefined">set <b>{{::node.data.callDetails.arguments[0]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button></span>
</span>
<span ng-if="node.data.type == 'jQuery - position'" class="offenders">
get from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
@@ -208,47 +201,47 @@
<span ng-if="node.data.callDetails.arguments[0] == 'false'"> to hidden</span>
</span>
<span ng-if="node.data.type == 'jQuery - on' || node.data.type == 'jQuery - one'" class="offenders">
bind <b>{{node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="isPureString(node.data.callDetails.arguments[1])">'s children filtered by <b>{{node.data.callDetails.arguments[1]}}</b></span>
bind <b>{{::node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="isPureString(node.data.callDetails.arguments[1])">'s children filtered by <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - off'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0]">
unbind <b>{{node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="isPureString(node.data.callDetails.arguments[1])">'s children filtered by <b>{{node.data.callDetails.arguments[1]}}</b></span>
unbind <b>{{::node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button><span ng-if="isPureString(node.data.callDetails.arguments[1])">'s children filtered by <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="!node.data.callDetails.arguments[0]">
unbind all events
</span>
</span>
<span ng-if="node.data.type == 'jQuery - live'" class="offenders">
bind <b>{{node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
bind <b>{{::node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - die'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0]">
unbind <b>{{node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
unbind <b>{{::node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="!node.data.callDetails.arguments[0]">
unbind all events
</span>
</span>
<span ng-if="node.data.type == 'jQuery - delegate'" class="offenders">
bind <b>{{node.data.callDetails.arguments[1]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>'s children filtered by <b>{{node.data.callDetails.arguments[0]}}</b>
bind <b>{{::node.data.callDetails.arguments[1]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>'s children filtered by <b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="node.data.type == 'jQuery - undelegate'" class="offenders">
<span ng-if="node.data.callDetails.arguments[1]">
unbind <b>{{node.data.callDetails.arguments[1]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>'s children filtered by <b>{{node.data.callDetails.arguments[0]}}</b>
unbind <b>{{::node.data.callDetails.arguments[1]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>'s children filtered by <b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="node.data.callDetails.arguments[0] && !node.data.callDetails.arguments[1]">
unbind namespace <b>{{node.data.callDetails.arguments[0]}}</b>
unbind namespace <b>{{::node.data.callDetails.arguments[0]}}</b>
</span>
<span ng-if="!node.data.callDetails.arguments[0]">
unbind all events
</span>
</span>
<span ng-if="node.data.type == 'jQuery - bind'" class="offenders">
bind <b>{{node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
bind <b>{{::node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - unbind'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0]">
unbind <b>{{node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
unbind <b>{{::node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="!node.data.callDetails.arguments[0]">
unbind all events
@@ -258,66 +251,66 @@
bind on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - removeAttr' || node.data.type == 'jQuery - removeProp'" class="offenders">
remove <b>{{node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
remove <b>{{::node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - val'" class="offenders">
<span ng-if="node.data.callDetails.arguments[0]">
set value <b>{{node.data.callDetails.arguments[0]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
set value <b>{{::node.data.callDetails.arguments[0]}}</b> to <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="!node.data.callDetails.arguments[0]">
get value from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
</span>
<span ng-if="node.data.type == 'jQuery - hasClass' || node.data.type == 'jQuery - addClass' || node.data.type == 'jQuery - removeClass'" class="offenders">
<b>{{node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<b>{{::node.data.callDetails.arguments[0]}}</b> on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - toggleClass'" class="offenders">
<span ng-if="!node.data.callDetails.arguments[0]">magic no-argument toggleClass</span>
<span ng-if="node.data.callDetails.arguments[0]">toggle <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">toggle <b>{{::node.data.callDetails.arguments[0]}}</b></span>
on <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[1]">to <b>{{node.data.callDetails.arguments[1]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">to <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - children'" class="offenders">
of <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">filtered by <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">filtered by <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - closest'" class="offenders">
closest <b>{{node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[1]">in context <b>{{node.data.callDetails.arguments[1]}}</b></span>
closest <b>{{::node.data.callDetails.arguments[0]}}</b> from <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[1]">in context <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - next' || node.data.type == 'jQuery - nextAll'" class="offenders">
after <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - nextUntil'" class="offenders">
after <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">until <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">and matching <b>{{node.data.callDetails.arguments[1]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">until <b>{{::node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">and matching <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - offsetParent'" class="offenders">
of <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
</span>
<span ng-if="node.data.type == 'jQuery - prev' || node.data.type == 'jQuery - prevAll'" class="offenders">
before <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - prevUntil'" class="offenders">
before <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">until <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">and matching <b>{{node.data.callDetails.arguments[1]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">until <b>{{::node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">and matching <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - parent' || node.data.type == 'jQuery - parents'" class="offenders">
of <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - parentsUntil'" class="offenders">
of <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">until <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">and matching <b>{{node.data.callDetails.arguments[1]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">until <b>{{::node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[1]">and matching <b>{{::node.data.callDetails.arguments[1]}}</b></span>
</span>
<span ng-if="node.data.type == 'jQuery - siblings'" class="offenders">
near <jquery-context-button context="node.data.callDetails.context"></jquery-context-button>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{node.data.callDetails.arguments[0]}}</b></span>
<span ng-if="node.data.callDetails.arguments[0]">matching <b>{{::node.data.callDetails.arguments[0]}}</b></span>
</span>
</div>
@@ -334,18 +327,9 @@
<p class="advice">Useless function call, as the jQuery object is empty.</p>
</div>
<div ng-if="node.data.callDetails.context.length == 1 && node.data.callDetails.context.firstElementPath">
<h4>Called on 1 jQuery element</h4>
<div>{{node.data.callDetails.context.firstElementPath}}</div>
</div>
<div ng-if="node.data.callDetails.context.length > 1">
<h4>Called on {{node.data.callDetails.context.length}} jQuery elements</h4>
<p class="advice" ng-if="node.data.type == 'jQuery - bind' && node.data.callDetails.context.length > 5">
The .bind() method attaches the event listener to each jQuery element one by one. Using the .on() method is preferable if available (from v1.7).
</p>
<p ng-if="node.data.callDetails.context.firstElementPath"><b>First one is:</b> {{node.data.callDetails.context.firstElementPath}}</p>
</div>
<p class="advice" ng-if="node.data.type == 'jQuery - bind' && node.data.callDetails.context.length > 5">
The .bind() method attaches the event listener to each jQuery element one by one. Using the .on() method is preferable if available (from v1.7).
</p>
<p class="advice" ng-if="node.data.resultsNumber === 0">
The query returned 0 results. Could it be unused or dead code?
@@ -368,7 +352,7 @@
</div>
</div>
</div>
<div class="startTime" ng-class="node.data.loadingStep">{{node.data.timestamp | number: 0}} ms</div>
<div class="startTime" ng-class="node.data.loadingStep">{{::node.data.timestamp | number: 0}} ms</div>
</div>
</div>