summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/new-console-output/selectors/messages.js
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 14:52:19 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:34 -0400
commit4dc8efd76cb2ff649cfcec5dfa88686ea79b4ee2 (patch)
treedfa6647b40b69c13eadf040e99000378db324ee7 /devtools/client/webconsole/new-console-output/selectors/messages.js
parent8e932efef46c70fd0c165ee432893f9898267f08 (diff)
downloadUXP-4dc8efd76cb2ff649cfcec5dfa88686ea79b4ee2.tar
UXP-4dc8efd76cb2ff649cfcec5dfa88686ea79b4ee2.tar.gz
UXP-4dc8efd76cb2ff649cfcec5dfa88686ea79b4ee2.tar.lz
UXP-4dc8efd76cb2ff649cfcec5dfa88686ea79b4ee2.tar.xz
UXP-4dc8efd76cb2ff649cfcec5dfa88686ea79b4ee2.zip
1283712 - Part 11.1: Show notes in devtools console.
Diffstat (limited to 'devtools/client/webconsole/new-console-output/selectors/messages.js')
-rw-r--r--devtools/client/webconsole/new-console-output/selectors/messages.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/devtools/client/webconsole/new-console-output/selectors/messages.js b/devtools/client/webconsole/new-console-output/selectors/messages.js
index c4b1aee28..e405be2f8 100644
--- a/devtools/client/webconsole/new-console-output/selectors/messages.js
+++ b/devtools/client/webconsole/new-console-output/selectors/messages.js
@@ -126,6 +126,15 @@ function matchSearchFilters(message, filters) {
|| (message.parameters !== null
&& message.parameters.join("").toLocaleLowerCase()
.includes(text.toLocaleLowerCase()))
+ // Look for a match in notes.
+ || (Array.isArray(message.notes) && message.notes.some(note =>
+ // Look for a match in location.
+ isTextInFrame(text, note.frame)
+ // Look for a match in messageBody.
+ || (note.messageBody !== null
+ && note.messageBody.toLocaleLowerCase()
+ .includes(text.toLocaleLowerCase()))
+ ))
);
}