Sha256: 5f3701a14643787b937c2a5f3148b8387b294ae08b6f4d9677aee270a6090a86

Contents?: true

Size: 462 Bytes

Versions: 6

Compression:

Stored size: 462 Bytes

Contents

# backtick_javascript: true

%x{
  // Inhibit the default exit behavior
  window.OPAL_EXIT_CODE = "noexit";

  Opal.exit = function(code) {
    // The first call to Opal.exit should save an exit code.
    // All next invocations must be ignored.
    // Then we send an event to Chrome CDP Interface that we are finished

    if (window.OPAL_EXIT_CODE === "noexit") {
      window.OPAL_EXIT_CODE = code;
      window.alert("opalheadlessbrowserexit");
    }
  }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 stdlib/headless_browser/base.rb
opal-1.8.2 stdlib/headless_browser/base.rb
opal-1.8.1 stdlib/headless_browser/base.rb
opal-1.8.0 stdlib/headless_browser/base.rb
opal-1.8.0.beta1 stdlib/headless_browser/base.rb
opal-1.8.0.alpha1 stdlib/headless_browser/base.rb