From 511c48a03adee54aaadbefdeb2d2d521f6a45843 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 11 Jul 2021 18:12:26 -0700 Subject: Revert "Remove unstable native plugins (#10908)" This reverts commit 7dd4090c2a3dc0222fd6ff611eeb2bd69cd28224. --- runtime/js/40_plugins.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 runtime/js/40_plugins.js (limited to 'runtime/js/40_plugins.js') 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); -- cgit v1.2.3