MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / initPrintScript

Method initPrintScript

src/app/BrowserScripts.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void BrowserScripts::initPrintScript()
27{
28 QWebEngineScript printScript;
29 printScript.setInjectionPoint(QWebEngineScript::DocumentCreation);
30 printScript.setName(QLatin1String("viper-window-script"));
31 printScript.setRunsOnSubFrames(true);
32 printScript.setWorldId(QWebEngineScript::MainWorld);
33 printScript.setSourceCode(QLatin1String("(function() { window.print = function() { "
34 "window.location = 'viper:print'; }; })()"));
35
36 m_globalScripts.push_back(printScript);
37}
38
39void BrowserScripts::initWebChannelScript()
40{

Callers

nothing calls this directly

Calls 1

setNameMethod · 0.80

Tested by

no test coverage detected