summaryrefslogtreecommitdiff
path: root/runtime/js/40_plugins.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_plugins.js')
-rw-r--r--runtime/js/40_plugins.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/js/40_plugins.js b/runtime/js/40_plugins.js
new file mode 100644
index 000000000..0796fd5ce
--- /dev/null
+++ b/runtime/js/40_plugins.js
@@ -0,0 +1,16 @@
+// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+"use strict";
+
+((window) => {
+ const core = window.Deno.core;
+
+ function openPlugin(filename) {
+ const rid = core.opSync("op_open_plugin", filename);
+ core.syncOpsCache();
+ return rid;
+ }
+
+ window.__bootstrap.plugins = {
+ openPlugin,
+ };
+})(this);