зеркало из https://github.com/electron/electron.git
Make sure every page will get a script context created
This commit is contained in:
Родитель
bb70defcb8
Коммит
17446f4284
|
@ -27,6 +27,7 @@
|
|||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebScriptSource.h"
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
|
@ -88,6 +89,9 @@ void AtomRenderViewObserver::DidCreateDocumentElement(
|
|||
blink::WebLocalFrame* frame) {
|
||||
document_created_ = true;
|
||||
|
||||
// Make sure every page will get a script context created.
|
||||
frame->executeScript(blink::WebScriptSource("void 0"));
|
||||
|
||||
// Read --zoom-factor from command line.
|
||||
std::string zoom_factor_str = base::CommandLine::ForCurrentProcess()->
|
||||
GetSwitchValueASCII(switches::kZoomFactor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче