MBrowser.js
670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cordova.define("com.gaoxiaobang.browser.MBrowserPlugin", function(require, exports, module) {
/**
* Created by Ryan on 16/2/24.
*/
var MBrowserPlugin = function(){};
var exec = require('cordova/exec');
MBrowserPlugin.prototype.browser = function(data,sucess,error){
exec(sucess,error,"MBrowserPlugin","browser",[data]);
}
MBrowserPlugin.prototype.goback = function(data,sucess,error){
alert("goback");
exec(sucess,error,"MBrowserPlugin","goback",[data]);
}
if(!window.plugins){
window.plugins = {};
}
if(!window.plugins.MBrowserPlugin){
window.plugins.MBrowserPlugin = new MBrowserPlugin();
}
module.exports = new MBrowserPlugin();
});