diff options
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r-- | ext/ffi/00_ffi.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index 3c4112a47..553ea1dd3 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -3,6 +3,7 @@ ((window) => { const core = window.Deno.core; + const __bootstrap = window.__bootstrap; class DynamicLibrary { #rid; @@ -23,7 +24,9 @@ } function dlopen(path, symbols) { - return new DynamicLibrary(path, symbols); + // URL support is progressively enhanced by util in `runtime/js`. + const pathFromURL = __bootstrap.util.pathFromURL ?? ((p) => p); + return new DynamicLibrary(pathFromURL(path), symbols); } window.__bootstrap.ffi = { dlopen }; |