[Webkit-unassigned] [Bug 212907] New: [GLib] Provide public API to allow customizing the module loader

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 8 12:02:11 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=212907

            Bug ID: 212907
           Summary: [GLib] Provide public API to allow customizing the
                    module loader
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

Currently the JS “import” statement in a bare JSCContext—as created by
“jsc_context_new()”—is not usable because the GLib API layer is not
providing the needed callbacks to provide module sources back to JSC.

Today I was having a conversation with Carlos García and this was my
proposal:

   <aperezdc> I think we could have a JSCContext.load-module signal which
      receives a JSCModuleRequest object (or similarly named), which is
      responsible for finding the source code for the module, and then it
      calls webkit_module_request_complete(request, module_source_as_gbytes)
      or webkit_module_request_fail(request, ...)
   <aperezdc> The default implementation could be “always fail for a bare
     JSCContext, and use WebKit's default module loader for a JSCContext
     associated with a WebView”
   <aperezdc> (actually, I am not completely sure that we want to allow
     configuring/overriding how module loading for a web view — maybe we
     just want to support it only for bare JSCContext instances)

This bug is to try and implement something among the lines described
above, and see whether the API feels ”right” :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200608/74b64ca7/attachment.htm>


More information about the webkit-unassigned mailing list