incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cordova Wiki] Update of "InAppBrowser" by brianleroux
Date Thu, 09 Aug 2012 19:43:20 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cordova Wiki" for change notification.

The "InAppBrowser" page has been changed by brianleroux:
http://wiki.apache.org/cordova/InAppBrowser

New page:
= InAppBrowser =

Provides the ability to spawn a browser instance from a Cordova application. The API is based
on standard browser capability. 

== Declarative API ==

The declarative API is based on the target attribute on anchor elements. 

  || _blank || system browser ||
  || _self || in application browser ||


[1] http://www.w3.org/TR/html401/types.html#type-frame-target

== Programatic API ==

{{{ window.open('local-url.html', '_self'); // loads in CordovaView. _parent and _top same
thing }}}
{{{ window.open('local-url.html', '_blank'); // loads in InAppBrowser }}}
{{{ window.open('http://whitelisted-url.com', '_self'); // loads in CordovaView }}}
{{{ window.open('http://whitelisted-url.com', '_blank'); // loads in InAppBrowser }}}
{{{ window.open('http://random-url.com', '_self'); // loads in InAppBrowser }}}
{{{ window.open('http://random-url.com', '_blank'); // native browser }}}

{{{ window.location = 'foo' }}} is equivalent to the '_self' options above.

Local and whitelisted URLs should be opened with Cordova functionality by default (_self)
and you have to be explicit if you want those trusted resources opened without Cordova functionality
(_blank).

Mime
View raw message