cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpchase <...@git.apache.org>
Subject [GitHub] cordova-plugin-inappbrowser pull request: CB-8444 Don't clobber `w...
Date Thu, 12 Feb 2015 21:52:21 GMT
GitHub user jpchase opened a pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/80

    CB-8444 Don't clobber `window.open`

    There are scenarios where an app needs the built-in `window.open` functionality (i.e.
to open an url in the system browser).  As the InAppBrowser clobbers window.open, it requires
the app to either change all affected `window.open` calls (to add "target=_system"), or undo
the clobber.  This clobber is particularly problematic when InAppBrowser is added to an app
as a dependency of another plugin.  For example, a plugin that provides an external web-based
authentication flow.
    
    Instead, each app should be able to control whether `window.open` is clobbered, regardless
of the inclusion of the InAppBrowser plugin.  This PR is a first step to add a new API to
access the InAppBrowser, separately from `window.open`.  The intention is to then remove the
clobber of `window.open` in a future release.
    
    Changes:
    - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`)
    - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`)
    - Add tests to use `window.open` via manual replace with new symbol
    - Update docs to deprecate plugin clobber of `window.open`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jpchase/cordova-plugin-inappbrowser CB-8444

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/80.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #80
    
----
commit ad263a1b539660b00e4cd4d4c5ac7be38acf9351
Author: Jason Chase <jasonpchase@gmail.com>
Date:   2015-02-12T21:34:32Z

    CB-8444 Don't clobber `window.open`
    - Add new symbol/clobber to access open function (`cordova.InAppBrowser.open`)
    - Change existing tests to use new symbol (i.e. don't rely on plugin clobber of `window.open`)
    - Add tests to use `window.open` via manual replace with new symbol
    - Update docs to deprecate plugin clobber of `window.open`

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message