Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LegacyExecute.php

function LegacyExecute::sync

Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. (synchronous)

Parameters

array{script: string, args: array} $jsonScript:

Return value

mixed

Overrides Execute::sync

File

vendor/lullabot/php-webdriver/lib/WebDriver/LegacyExecute.php, line 52

Class

LegacyExecute
WebDriver\LegacyExecute class

Namespace

WebDriver

Code

public function sync(array $jsonScript) {
    $jsonScript['args'] = $this->serializeArguments($jsonScript['args']);
    $result = $this->curl('POST', '/execute', $jsonScript);
    return $this->unserializeResult($result['value']);
}
RSS feed
Powered by Drupal