Update: add some apis

This commit is contained in:
jas0ncn 2018-09-02 16:56:58 +08:00
parent f40da55557
commit 4dacafb285
2 changed files with 17 additions and 1 deletions

View File

@ -124,6 +124,22 @@ export class JsBridge {
) )
}) })
} }
public ping () {
return this.callHandler('ping')
}
public readConfigString () {
return this.callHandler('readConfigString')
}
public getPasteboard () {
return this.callHandler('getPasteboard')
}
public setPasteboard (data: string) {
return this.callHandler('setPasteboard', data)
}
} }
export function setupJsBridge (callback) { export function setupJsBridge (callback) {

View File

@ -1,7 +1,7 @@
import * as React from 'react' import * as React from 'react'
import { render } from 'react-dom' import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader' import { AppContainer } from 'react-hot-loader'
import App from './components/App' import App from '@components/App'
const rootEl = document.getElementById('root') const rootEl = document.getElementById('root')