Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit d6bbd41

Browse files
committed
Merge pull request #190 from theaccordance/master
Browser Platform Mock
2 parents 0cc2783 + e5b8461 commit d6bbd41

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

plugin.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@
4747
-->
4848
</platform>
4949

50+
<!-- browser -->
51+
<platform name="browser">
52+
<js-module src="www/browser/keyboard.js" name="keyboard">
53+
<runs/>
54+
<clobbers target="cordova.plugins.Keyboard" />
55+
</js-module>
56+
</platform>
57+
5058
<!-- blackberry10 -->
5159
<platform name="blackberry10">
5260
<source-file src="src/blackberry10/index.js" target-dir='Keyboard' />

www/browser/keyboard.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
var argscheck = require('cordova/argscheck'),
3+
utils = require('cordova/utils'),
4+
exec = require('cordova/exec');
5+
6+
7+
var Keyboard = function() {
8+
};
9+
10+
Keyboard.hideKeyboardAccessoryBar = function(hide) {
11+
return null;
12+
};
13+
14+
Keyboard.close = function() {
15+
return null;
16+
};
17+
18+
Keyboard.show = function() {
19+
return null;
20+
};
21+
22+
Keyboard.disableScroll = function(disable) {
23+
return null;
24+
};
25+
26+
/*
27+
Keyboard.styleDark = function(dark) {
28+
exec(null, null, "Keyboard", "styleDark", [dark]);
29+
};
30+
*/
31+
32+
Keyboard.isVisible = false;
33+
34+
module.exports = Keyboard;

0 commit comments

Comments
 (0)