@override
(script, ...args)
| 808 | |
| 809 | /** @override */ |
| 810 | executeScript(script, ...args) { |
| 811 | if (typeof script === 'function') { |
| 812 | script = 'return (' + script + ').apply(null, arguments);' |
| 813 | } |
| 814 | |
| 815 | if (script && script instanceof PinnedScript) { |
| 816 | return this.execute( |
| 817 | new command.Command(command.Name.EXECUTE_SCRIPT) |
| 818 | .setParameter('script', script.executionScript()) |
| 819 | .setParameter('args', args), |
| 820 | ) |
| 821 | } |
| 822 | |
| 823 | return this.execute( |
| 824 | new command.Command(command.Name.EXECUTE_SCRIPT).setParameter('script', script).setParameter('args', args), |
| 825 | ) |
| 826 | } |
| 827 | |
| 828 | /** @override */ |
| 829 | executeAsyncScript(script, ...args) { |
no test coverage detected