1,
src hird_partyWebKitSourcecoredomeventsEvent.h:
src hird_partylink enderercoredomeventsevent.h bool isTrusted() const { return is_trusted_; } void SetTrusted(bool value) { is_trusted_ = value; }
2,屏蔽所有弹出框:
electron/shell/browser/atom_javascript_dialog_manager.cc line 58: #if 0 if (dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT && dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_CONFIRM) { #else if(true){ std::move(callback).Run(false, base::string16()); return; } #endif
3,禁用
// Don't enforce the same-origin policy. (Used by people testing their sites.) --disable-site-isolation-trials --disable-web-security --disable-features=IsolateOrigins, site-per-proecess const wchar_t kDisableWebSecurity[] = L"disable-web-security";