summaryrefslogtreecommitdiff
path: root/core/examples
diff options
context:
space:
mode:
Diffstat (limited to 'core/examples')
-rw-r--r--core/examples/hello_world.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/examples/hello_world.rs b/core/examples/hello_world.rs
index 3a40ee29a..62d268340 100644
--- a/core/examples/hello_world.rs
+++ b/core/examples/hello_world.rs
@@ -19,8 +19,8 @@ fn main() {
// The second one just transforms some input and returns it to JavaScript.
// Register the op for outputting a string to stdout.
- // It can be invoked with Deno.core.dispatch and the id this method returns
- // or Deno.core.dispatchByName and the name provided.
+ // It can be invoked with Deno.core.opcall and the id this method returns
+ // or Deno.core.opSync and the name provided.
runtime.register_op(
"op_print",
// The op_fn callback takes a state object OpState,
@@ -72,7 +72,7 @@ Deno.core.ops();
// our op_print op to display the stringified argument.
const _newline = new Uint8Array([10]);
function print(value) {
- Deno.core.dispatchByName('op_print', 0, value.toString(), _newline);
+ Deno.core.opSync('op_print', value.toString(), _newline);
}
"#,
)