Lisa testing pulling in plugins for plugin: cordova-plugin-inappbrowser

This commit is contained in:
ldeluca 2014-05-27 17:49:43 -04:00
parent 8e2db096ae
commit 687ce60470

299
doc/ja/index.md Normal file
View File

@ -0,0 +1,299 @@
<!---
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.
-->
# org.apache.cordova.inappbrowser
This plugin provides a web browser view that displays when calling `window.open()`, or when opening a link formed as `<a target="_blank">`.
var ref = window.open('http://apache.org', '_blank', 'location=yes');
**注**: ウィンドウの動作、InAppBrowser 標準的な web ブラウザーのようとコルドバの Api にアクセスできません。
## インストール
cordova plugin add org.apache.cordova.inappbrowser
### Firefox の OS
[マニフェストのドキュメント][1]で説明されているように、 **www/manifest.webapp**を作成します。関連する権限を追加します。
[1]: https://developer.mozilla.org/en-US/Apps/Developing/Manifest
"permissions": {
"browser": {}
}
## window.open
新しい URL を開き `InAppBrowser` インスタンス、現在のブラウザー インスタンスまたはシステムのブラウザー。
var ref = window.open url、ターゲット (オプション);
* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)*
* **url**: *(文字列)*をロードする URL。電話 `encodeURI()` 場合は、この上の URL は Unicode 文字を含みます。
* **ターゲット**: ターゲット URL は、既定値は、省略可能なパラメーターをロードするを `_self` 。*(文字列)*
* `_self`: コルドバ WebView URL がホワイト リストにある場合で開きます、それ以外の場合で開きます、`InAppBrowser`.
* `_blank`: で開きます、`InAppBrowser`.
* `_system`: システムの web ブラウザーで開きます。
* **オプション**: おぷしょん、 `InAppBrowser` 。省略可能にする: `location=yes` 。*(文字列)*
`options`文字列にはする必要があります任意の空白スペースが含まれていないと、各機能の名前と値のペアをコンマで区切る必要があります。 機能名では大文字小文字を区別します。 以下の値をサポートするプラットフォーム。
* **場所** に設定 `yes` または `no` を有効にする、 `InAppBrowser` の場所バー オンまたはオフにします。
アンドロイドのみ:
* **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。
* **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常負荷ブラウザーを持っています。
* **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に
* **clearsessioncache** に設定されている `yes` はセッション cookie のキャッシュをオフに新しいウィンドウを開く前に
iOS のみ:
* **closebuttoncaption**: [**完了**] ボタンのキャプションとして使用する文字列に設定します。自分でこの値をローカライズする必要があることに注意してください。
* **disallowoverscroll**: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property.
* **非表示**: 設定 `yes` ブラウザーを作成して、ページの読み込みが表示されません。 Loadstop イベントは、読み込みが完了すると発生します。 省略するか設定 `no` (既定値) を開くし、通常負荷ブラウザーを持っています。
* **clearcache**: に設定されている `yes` 、ブラウザーのクッキー キャッシュ クリア新しいウィンドウが開く前に
* **clearsessioncache** に設定されている `yes` はセッション cookie のキャッシュをオフに新しいウィンドウを開く前に
* **toolbar**: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`)
* **enableViewportScale**: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`).
* **mediaPlaybackRequiresUserAction**: Set to `yes` or `no` to prevent HTML5 audio or video from autoplaying (defaults to `no`).
* **allowInlineMediaPlayback**: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`)
* **keyboardDisplayRequiresUserAction**: Set to `yes` or `no` to open the keyboard when form elements receive focus via JavaScript's `focus()` call (defaults to `yes`).
* **suppressesIncrementalRendering**: Set to `yes` or `no` to wait until all new view content is received before being rendered (defaults to `no`).
* **presentationstyle**: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style][2] (defaults to `fullscreen`).
* **transitionstyle**: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style][3] (defaults to `coververtical`).
* **toolbarposition**: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window.
[2]: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle
[3]: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* ブラックベリー 10
* iOS
* Windows Phone 7 と 8
### 例
var ref = window.open('http://apache.org', '_blank', 'location=yes');
var ref2 = window.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');
## InAppBrowser
The object returned from a call to `window.open`.
### メソッド
* addEventListener
* removeEventListener
* close
* show
* executeScript
* insertCSS
## addEventListener
> イベントのリスナーを追加します、`InAppBrowser`.
ref.addEventListener(eventname, callback);
* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)*
* **eventname**: *(文字列)*をリッスンするイベント
* **** イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。
* **loadstop** イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。
* **loaderror** イベントが発生するとき、 `InAppBrowser` URL の読み込みでエラーが発生します。
* **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。
* **コールバック**: イベントが発生したときに実行される関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクトをパラメーターとして。
### InAppBrowserEvent Properties
* **タイプ**: eventname どちらか `loadstart``loadstop``loaderror` 、または `exit` 。*(文字列)*
* **url**: URL が読み込まれました。*(文字列)*
* **コード**: の場合にのみ、エラー コード `loaderror` 。*(数)*
* **メッセージ**: の場合にのみ、エラー メッセージ `loaderror` 。*(文字列)*
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* iOS
* Windows Phone 7 と 8
### 簡単な例
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function(event) { alert(event.url); });
## removeEventListener
> イベントのリスナーを削除します、`InAppBrowser`.
ref.removeEventListener(eventname, callback);
* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)*
* **eventname**: イベントのリッスンを停止します。*(文字列)*
* **** イベントが発生するとき、 `InAppBrowser` の URL の読み込みが開始します。
* **loadstop** イベントが発生するとき、 `InAppBrowser` URL の読み込みが完了します。
* **loaderror** イベントが発生するとき、 `InAppBrowser` URL の読み込みエラーが発生します。
* **終了**: イベントが発生するとき、 `InAppBrowser` ウィンドウが閉じられます。
* **コールバック**: イベントが発生するときに実行する関数。関数に渡されますが、 `InAppBrowserEvent` オブジェクト。
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* iOS
* Windows Phone 7 と 8
### 簡単な例
var ref = window.open('http://apache.org', '_blank', 'location=yes');
var myCallback = function(event) { alert(event.url); }
ref.addEventListener('loadstart', myCallback);
ref.removeEventListener('loadstart', myCallback);
## close
> 閉じる、 `InAppBrowser` ウィンドウ。
ref.close();
* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)*
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* iOS
* Windows Phone 7 と 8
### 簡単な例
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.close();
## show
> 隠された開かれた InAppBrowser ウィンドウが表示されます。この関数を呼び出すは影響しません、InAppBrowser が既に表示されている場合。
ref.show();
* **ref**: InAppBrowser ウィンドウ (への参照`InAppBrowser`)
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* iOS
### 簡単な例
var ref = window.open('http://apache.org', '_blank', 'hidden=yes');
// some time later...
ref.show();
## executeScript
> JavaScript コードに挿入します、 `InAppBrowser` ウィンドウ
ref.executeScript(details, callback);
* **ref**: への参照を `InAppBrowser` ウィンドウ。*(InAppBrowser)*
* **injectDetails** 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)*
* **ファイル** スクリプトの URL を注入します。
* **コード**: スクリプトのテキストを挿入します。
* **コールバック**: JavaScript コードを注入した後に実行される関数。
* 挿入されたスクリプトが型の場合 `code` 、スクリプトの戻り値は、1 つのパラメーターでコールバックを実行するのに包まれて、 `Array` 。 マルチライン スクリプトについては、最後のステートメントでは、または評価した最後の式の戻り値です。
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* iOS
### 簡単な例
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
ref.executeScript({file: "myscript.js"});
});
## insertCSS
> CSS に注入する、 `InAppBrowser` ウィンドウ。
ref.insertCSS(details, callback);
* **ref**: への参照を `InAppBrowser` ウィンドウ*(InAppBrowser)*
* **injectDetails** 詳細を実行するスクリプトのいずれかを指定する、 `file` または `code` キー。*(オブジェクト)*
* **ファイル**: 注入するスタイル シートの URL。
* **コード**: 注入するスタイル シートのテキスト。
* **コールバック**: CSS の注入後に実行される関数。
### サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* iOS
### 簡単な例
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
ref.insertCSS({file: "mystyles.css"});
});