Version: v5.0.5, v5.0.6
JavaScript code: `document.querySelector('iframe').contentWindow.print()`
shell/browser/api/atom_api_web_contents.cc
v8::Local<v8::Value> val,
                     electron::api::WebContents::Type* out) {
    using Type = electron::api::WebContents::Type;
    std::string type;
    if (!ConvertFromV8(isolate, val, &type))
      return false;
    if (type == "backgroundPage") {
      *out = Type::BACKGROUND_PAGE;
    } else if (type == "browserView") {
      *out = Type::BROWSER_VIEW;
    } else if (type == "webview") {
      *out = Type::WEB_VIEW;
#if BUILDFLAG(ENABLE_OSR)
    } else if (type == "offscreen") {
      *out = Type::OFF_SCREEN;
#endif
    } else {
      return false;
    }
    return true;
  }
};
}  
namespace electron {
namespace api {
namespace {
void OnCapturePageDone(util::Promise promise, const SkBitmap& bitmap) {