feat: add WebContentsView API

This commit is contained in:
Cheng Zhao 2018-05-07 16:04:33 +09:00
parent e058d11657
commit 5a320222e2
8 changed files with 165 additions and 2 deletions

View file

@ -24,6 +24,7 @@ module.exports = [
{name: 'Tray', file: 'tray'},
{name: 'View', file: 'view'},
{name: 'webContents', file: 'web-contents'},
{name: 'WebContentsView', file: 'web-contents-view'},
// The internal modules, invisible unless you know their names.
{name: 'NavigationController', file: 'navigation-controller', private: true}
]

View file

@ -0,0 +1,15 @@
'use strict'
const electron = require('electron')
const {View} = electron
const {WebContentsView} = process.atomBinding('web_contents_view')
Object.setPrototypeOf(WebContentsView.prototype, View.prototype)
WebContentsView.prototype._init = function () {
// Call parent class's _init.
View.prototype._init.call(this)
}
module.exports = WebContentsView