We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1504d52 commit a83f415Copy full SHA for a83f415
devtools/src/devtools/lib/inspectedWindow.js
@@ -6,9 +6,13 @@
6
// recent(ly) used element(s), assign an id to them, and then use messaging. But
7
// for now, this is way easier.
8
9
+function escape(str) {
10
+ return str.replace(/'/g, "\\'").replace(/\n/g, '\\n');
11
+}
12
+
13
function logQuery(query) {
14
chrome.devtools.inspectedWindow.eval(`
- console.log('${query.replace(/'/g, "\\'")}');
15
+ console.log('${escape(query)}');
16
console.log(eval(${query}));
17
`);
18
}
0 commit comments