PHP-Deno

MainWorker
in package

The Deno main worker. This includes a JsRuntime along with all the standard ops from Deno CLI, such as Deno.core.* and the web APIs such as TextEncoder etc. Use the MainWorker if you want to run programs that are written to run in Deno. The Deno provided ops such as `fetch()` uses it's own TLS and request stack.

Table of Contents

Methods

__construct()  : mixed
execute_main_module()  : mixed
execute_script()  : mixed
Execute JavaSscript inside the V8 Isolate.
run_event_loop()  : mixed

Methods

execute_script()

Execute JavaSscript inside the V8 Isolate.

public execute_script(string $name, string $source_code) : mixed

This does not support top level await for Es6 imports. use load_main_module to execute JavaScript in modules.

Parameters
$name : string
$source_code : string

        
On this page

Search results