var webFrame = require('electron').webFrame;
webFrame.setZoomFactor(2);
方法
webFrame.setZoomFactor(factor)
webFrame.getZoomFactor()
webFrame.setZoomLevel(level)
webFrame.getZoomLevel()
webFrame.setZoomLevelLimits(minimumLevel, maximumLevel)
minimumLevel
NumbermaximumLevel
Number
webFrame.setSpellCheckProvider(language, autoCorrectWord, provider)
language
StringautoCorrectWord
Booleanprovider
Object
webFrame.setSpellCheckProvider("en-US", true, {
spellCheck: function(text) {
return !(require('spellchecker').isMisspelled(text));
}
});
webFrame.registerURLSchemeAsSecure(scheme)
webFrame.registerURLSchemeAsBypassingCSP(scheme)
webFrame.registerURLSchemeAsPrivileged(scheme)
webFrame.insertText(text)
webFrame.executeJavaScript(code[, userGesture])
code
StringuserGesture
Boolean (可选) - 默认为 false
.
请发表评论