forked from fastrde/cordova-plugin-fastrde-injectview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinject.js
29 lines (27 loc) · 1.04 KB
/
inject.js
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
var cordova = require('cordova'),
exec = require('cordova/exec'),
pluginloader = require('cordova/pluginloader'),
modulemapper = require('cordova/modulemapper');
var inject = {
javascriptFile: function(script, success, error){
success = success || function (){ };
error = error || function (){ };
cordova.exec(success, error, "Inject", "javascriptFile", [script]);
},
javascriptString: function(script, success, error){
success = success || function (){ };
error = error || function (){ };
cordova.exec(success, error, "Inject", "javascriptString", [script]);
},
getCookies: function(cookieDomain, success, error){
success = success || function (){ };
error = error || function (){ };
cordova.exec(success, error, "Inject", "getCookies", [cookieDomain]);
},
getCookie: function(cookieDomain, cookieName, success, error){
success = success || function (){ };
error = error || function (){ };
cordova.exec(success, error, "Inject", "getCookie", [cookieDomain, cookieName]);
}
}
module.exports = inject;