INNER CODE UNIT · JavaScript

createModule

pretzelai/pretzelai · dev_mode/index.js:10

async function createModule(scope, module) {
  try {
    const factory = await window._JUPYTERLAB[scope].get(module);
    const instance = factory();
    instance.__scope__ = scope;
    return instance;
  } catch(e) {
    console.warn(`Failed to create module: package: ${scope}; module: ${module}`);
    throw e;
  }
}

/**
 * The main entry point for the application.
 */
export async function main() {

   // Handle a browser test.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…