@override
(script, ...args)
| 820 | |
| 821 | /** @override */ |
| 822 | executeScript(script, ...args) { |
| 823 | if (typeof script === 'function') { |
| 824 | script = 'return (' + script + ').apply(null, arguments);' |
| 825 | } |
| 826 | |
| 827 | if (script && script instanceof PinnedScript) { |
| 828 | return this.execute( |
| 829 | new command.Command(command.Name.EXECUTE_SCRIPT) |
| 830 | .setParameter('script', script.executionScript()) |
| 831 | .setParameter('args', args), |
| 832 | ) |
| 833 | } |
| 834 | |
| 835 | return this.execute( |
| 836 | new command.Command(command.Name.EXECUTE_SCRIPT).setParameter('script', script).setParameter('args', args), |
| 837 | ) |
| 838 | } |
| 839 | |
| 840 | /** @override */ |
| 841 | executeAsyncScript(script, ...args) { |
no test coverage detected