Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions appshell/cef_main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ BOOL cef_main_window::HandleCreate()

settings.web_security = STATE_DISABLED;

// Necessary to enable document.executeCommand("paste")
settings.javascript_access_clipboard = STATE_ENABLED;
settings.javascript_dom_paste = STATE_ENABLED;

// Initialize window info to the defaults for a child window
info.SetAsChild(mWnd, rect);

Expand Down
4 changes: 4 additions & 0 deletions appshell/cefclient_gtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ int main(int argc, char* argv[]) {

browserSettings.web_security = STATE_DISABLED;

// Necessary to enable document.executeCommand("paste")
browserSettings.javascript_access_clipboard = STATE_ENABLED;
browserSettings.javascript_dom_paste = STATE_ENABLED;

window_info.SetAsChild(vbox);

CefBrowserHost::CreateBrowser(
Expand Down
4 changes: 4 additions & 0 deletions appshell/cefclient_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ - (void)createApp:(id)object {

settings.web_security = STATE_DISABLED;

// Necessary to enable document.executeCommand("paste")
settings.javascript_access_clipboard = STATE_ENABLED;
settings.javascript_dom_paste = STATE_ENABLED;

CefRefPtr<CefCommandLine> cmdLine = AppGetCommandLine();

#ifdef DARK_INITIAL_PAGE
Expand Down