Make sure every page will get a script context created
This commit is contained in:
parent
bb70defcb8
commit
17446f4284
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue