This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
forked from purplecabbage/phonegap-plugins
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverted iPhone/ChildBrowser for PhoneGap 1.4.1 per Issue #643
reverted iPhone/ChildBrowser for PhoneGap 1.4.1 per Issue #643 I will tag relavent commits so PG/CDV version support can easily be found
- Loading branch information
1 parent
60c88f7
commit 3627523
Showing
17 changed files
with
66 additions
and
104 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,73 @@ | ||
/* MIT licensed */ | ||
// (c) 2010 Jesse MacFadyen, Nitobi | ||
|
||
/*global PhoneGap/Cordova */ | ||
/*global PhoneGap */ | ||
|
||
function ChildBrowser() | ||
{ | ||
// Does nothing | ||
function ChildBrowser() { | ||
// Does nothing | ||
} | ||
|
||
// Callback when the location of the page changes | ||
// called from native | ||
ChildBrowser._onLocationChange = function(newLoc) | ||
{ | ||
window.plugins.childBrowser.onLocationChange(newLoc); | ||
window.plugins.childBrowser.onLocationChange(newLoc); | ||
}; | ||
|
||
// Callback when the user chooses the 'Done' button | ||
// called from native | ||
ChildBrowser._onClose = function() | ||
{ | ||
window.plugins.childBrowser.onClose(); | ||
window.plugins.childBrowser.onClose(); | ||
}; | ||
|
||
// Callback when the user chooses the 'open in Safari' button | ||
// called from native | ||
ChildBrowser._onOpenExternal = function() | ||
{ | ||
window.plugins.childBrowser.onOpenExternal(); | ||
window.plugins.childBrowser.onOpenExternal(); | ||
}; | ||
|
||
// Pages loaded into the ChildBrowser can execute callback scripts, so be careful to | ||
// check location, and make sure it is a location you trust. | ||
// Warning ... don't exec arbitrary code, it's risky and could fuck up your app. | ||
// called from native | ||
ChildBrowser._onJSCallback = function(js,loc) | ||
{ | ||
// Not Implemented | ||
//window.plugins.childBrowser.onJSCallback(js,loc); | ||
// Not Implemented | ||
//window.plugins.childBrowser.onJSCallback(js,loc); | ||
}; | ||
|
||
/* The interface that you will use to access functionality */ | ||
|
||
// Show a webpage, will result in a callback to onLocationChange | ||
ChildBrowser.prototype.showWebPage = function(loc) | ||
{ | ||
if (typeof PhoneGap !== "undefined") | ||
{ | ||
PhoneGap.exec("ChildBrowserCommand.showWebPage", loc); | ||
} | ||
if (typeof Cordova !== "undefined") | ||
{ | ||
Cordova.exec("ChildBrowserCommand.showWebPage", loc); | ||
} | ||
PhoneGap.exec("ChildBrowserCommand.showWebPage", loc); | ||
}; | ||
|
||
// close the browser, will NOT result in close callback | ||
ChildBrowser.prototype.close = function() | ||
{ | ||
if (typeof PhoneGap !== "undefined") | ||
{ | ||
PhoneGap.exec("ChildBrowserCommand.close"); | ||
} | ||
if (typeof Cordova !== "undefined") | ||
{ | ||
Cordova.exec("ChildBrowserCommand.close"); | ||
} | ||
PhoneGap.exec("ChildBrowserCommand.close"); | ||
}; | ||
|
||
// Not Implemented | ||
ChildBrowser.prototype.jsExec = function(jsString) | ||
{ | ||
// Not Implemented!! | ||
//PhoneGap.exec("ChildBrowserCommand.jsExec",jsString); | ||
// Not Implemented!! | ||
//PhoneGap.exec("ChildBrowserCommand.jsExec",jsString); | ||
}; | ||
|
||
// Note: this plugin does NOT install itself, call this method some time after deviceready to install it | ||
// it will be returned, and also available globally from window.plugins.childBrowser | ||
ChildBrowser.install = function() | ||
{ | ||
if(!window.plugins) | ||
{ | ||
window.plugins = { | ||
}; | ||
} | ||
window.plugins.childBrowser = new ChildBrowser(); | ||
return window.plugins.childBrowser; | ||
if(!window.plugins) { | ||
window.plugins = {}; | ||
} | ||
|
||
window.plugins.childBrowser = new ChildBrowser(); | ||
return window.plugins.childBrowser; | ||
}; | ||
|
24 changes: 11 additions & 13 deletions
24
iPhone/ChildBrowser/ChildBrowserCommand.h
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
iPhone/ChildBrowser/ChildBrowserViewController.h
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
12 changes: 4 additions & 8 deletions
12
iPhone/ChildBrowser/README.md → iPhone/ChildBrowser/README.txt
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters