You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/11/21 00:34:20 UTC
js commit: Added InAppBrowser common plugin (window.open)
Updated Branches:
refs/heads/master 9204c357b -> 3e61b37c6
Added InAppBrowser common plugin (window.open)
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/3e61b37c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/3e61b37c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/3e61b37c
Branch: refs/heads/master
Commit: 3e61b37c6364aae1a5a45b184e13810cc88d5350
Parents: 9204c35
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Nov 20 14:52:12 2012 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Nov 20 15:34:08 2012 -0800
----------------------------------------------------------------------
lib/common/common.js | 3 ++
lib/common/plugin/InAppBrowser.js | 34 ++++++++++++++++++++++++++++++++
lib/ios/platform.js | 3 ++
3 files changed, 40 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e61b37c/lib/common/common.js
----------------------------------------------------------------------
diff --git a/lib/common/common.js b/lib/common/common.js
index 2b3ec40..2dbe248 100644
--- a/lib/common/common.js
+++ b/lib/common/common.js
@@ -39,6 +39,9 @@ module.exports = {
}
}
},
+ open : {
+ path: 'cordova/plugin/InAppBrowser'
+ },
navigator: {
children: {
notification: {
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e61b37c/lib/common/plugin/InAppBrowser.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/InAppBrowser.js b/lib/common/plugin/InAppBrowser.js
new file mode 100644
index 0000000..dee450f
--- /dev/null
+++ b/lib/common/plugin/InAppBrowser.js
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var exec = require('cordova/exec');
+
+var InAppBrowser = {
+ open : function(strUrl, strWindowName, strWindowFeatures) {
+ exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
+ return InAppBrowser;
+ },
+ close : function() {
+ exec(null, null, "InAppBrowser", "close", []);
+ }
+};
+
+module.exports = InAppBrowser.open;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/3e61b37c/lib/ios/platform.js
----------------------------------------------------------------------
diff --git a/lib/ios/platform.js b/lib/ios/platform.js
index c196a92..9a0f3c0 100644
--- a/lib/ios/platform.js
+++ b/lib/ios/platform.js
@@ -42,6 +42,9 @@ module.exports = {
},
console: {
path: 'cordova/plugin/ios/console'
+ },
+ open : {
+ path: 'cordova/plugin/InAppBrowser'
}
},
merges:{