You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Warn if `executeScript()` or `executeAsyncScript()` are called with missing or empty script
2
+
3
+
This is a simple rule that would warn if `executeScript()`/`executeAsyncScript()` calls are missing arguments, or if the first argument is an empty string.
4
+
5
+
## Rule details
6
+
7
+
:thumbsdown: Any use of the following patterns are considered warnings:
8
+
9
+
```js
10
+
browser.executeScript();
11
+
browser.executeAsyncScript();
12
+
browser.executeScript("");
13
+
browser.executeAsyncScript('');
14
+
```
15
+
16
+
:thumbsup: The following patterns are not errors:
17
+
18
+
```js
19
+
browser.executeScript("var a = 1;");
20
+
browser.executeAsyncScript("var a = 1;");
21
+
var tag =browser.executeScript('return arguments[0].tagName', el);
0 commit comments