feat: add Button API

This commit is contained in:
Cheng Zhao 2018-05-24 16:56:02 +09:00
parent ba3700141f
commit c8e8cb86ce
6 changed files with 109 additions and 0 deletions

15
lib/browser/api/button.js Normal file
View file

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

View file

@ -3,6 +3,7 @@ module.exports = [
{name: 'app', file: 'app'},
{name: 'autoUpdater', file: 'auto-updater'},
{name: 'BoxLayout', file: 'box-layout'},
{name: 'Button', file: 'button'},
{name: 'BrowserView', file: 'browser-view'},
{name: 'BrowserWindow', file: 'browser-window'},
{name: 'contentTracing', file: 'content-tracing'},