feat: add View API

This commit is contained in:
Cheng Zhao 2018-05-07 14:52:25 +09:00
parent 874af5c982
commit e058d11657
8 changed files with 108 additions and 0 deletions

View file

@ -22,6 +22,7 @@ module.exports = [
{name: 'TopLevelWindow', file: 'top-level-window'},
{name: 'TouchBar', file: 'touch-bar'},
{name: 'Tray', file: 'tray'},
{name: 'View', file: 'view'},
{name: 'webContents', file: 'web-contents'},
// The internal modules, invisible unless you know their names.
{name: 'NavigationController', file: 'navigation-controller', private: true}

8
lib/browser/api/view.js Normal file
View file

@ -0,0 +1,8 @@
'use strict'
const {EventEmitter} = require('events')
const {View} = process.atomBinding('view')
Object.setPrototypeOf(View.prototype, EventEmitter.prototype)
module.exports = View