From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../toolkit_api/fuel/fueliannotations/index.html | 124 ++++++++++++++++++ .../toolkit_api/fuel/fueliapplication/index.html | 11 ++ files/ja/toolkit_api/fuel/fuelibookmark/index.html | 107 ++++++++++++++++ .../fuel/fuelibookmarkfolder/index.html | 135 ++++++++++++++++++++ .../toolkit_api/fuel/fuelibookmarkroots/index.html | 51 ++++++++ .../ja/toolkit_api/fuel/fuelibrowsertab/index.html | 140 +++++++++++++++++++++ files/ja/toolkit_api/fuel/fueliwindow/index.html | 82 ++++++++++++ files/ja/toolkit_api/fuel/index.html | 44 +++++++ 8 files changed, 694 insertions(+) create mode 100644 files/ja/toolkit_api/fuel/fueliannotations/index.html create mode 100644 files/ja/toolkit_api/fuel/fueliapplication/index.html create mode 100644 files/ja/toolkit_api/fuel/fuelibookmark/index.html create mode 100644 files/ja/toolkit_api/fuel/fuelibookmarkfolder/index.html create mode 100644 files/ja/toolkit_api/fuel/fuelibookmarkroots/index.html create mode 100644 files/ja/toolkit_api/fuel/fuelibrowsertab/index.html create mode 100644 files/ja/toolkit_api/fuel/fueliwindow/index.html create mode 100644 files/ja/toolkit_api/fuel/index.html (limited to 'files/ja/toolkit_api/fuel') diff --git a/files/ja/toolkit_api/fuel/fueliannotations/index.html b/files/ja/toolkit_api/fuel/fueliannotations/index.html new file mode 100644 index 0000000000..d28431b388 --- /dev/null +++ b/files/ja/toolkit_api/fuel/fueliannotations/index.html @@ -0,0 +1,124 @@ +--- +title: fuelIAnnotations +slug: Toolkit_API/FUEL/fuelIAnnotations +tags: + - FUEL + - Firefox + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIAnnotations +--- +
+ {{ Fx_minversion_header(3) }} 注釈サービスは Firefox 3 にて Web ページに関する任意のデータを保存するために設計されました。
+

メソッドの概要

+ + + + + + + + + + + + + + + +
boolean has(in AString aName)
nsIVariant get(in AString aName)
void set(in AString aName, in nsIVariant aValue, in PRInt32 aExpiration)
void remove(in AString aName)
+

プロパティ

+ + + + + + + + + + + + + +
プロパティ名説明
names読取専用属性 nsIVariantこの注釈オブジェクトを所有するブックマークアイテムに関連付けられたすべての注釈の名前の配列
+

メソッド

+

has()

+

指定した名前の注釈が存在するかどうかを調べる。

+
boolean has(in AString aName)
+
+

引数

+
+
+ aName
+
+ 注釈の名前。
+
+

戻り値

+

指定した名前の注釈が存在すれば true、さもなくば false。

+

get()

+

指定した名前の注釈の値を取得する。

+
nsIVariant get(in AString aName)
+
+

引数

+
+
+ aName
+
+ 注釈の名前。
+
+

戻り値

+

注釈の値を含む変数。文字列、真偽値、数値をサポートする。

+

set()

+

指定した名前の注釈へ値をセットする。

+
void set(in AString aName, in nsIVariant aValue, in PRInt32 aExpiration)
+
+

引数

+
+
+ aName
+
+ 注釈の名前。
+
+ aValue
+
+ 注釈の値。文字列、真偽値、数値をサポートする。
+
+ aExpiration
+
+ 注釈の有効期限ポリシー。 nsIAnnotationService 参照。
+
+

戻り値

+

remove()

+

この注釈オブジェクトを所有するブックマークアイテムから、指定した名前の注釈を削除する。

+
void remove(in AString aName)
+

引数

+
+
+ aName
+
+ 注釈の名前。
+
+

戻り値

+

+
const NEVER_EXPIRE = 0;
+
+function url(spec) {
+  var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
+  return ios.newURI(spec, null, null);
+}
+
+var bookmark = Application.bookmarks.menu.addBookmark("Mozilla", url("http://www.mozilla.com/"));
+bookmark.annotations.set("mystuff/public", true, NEVER_EXPIRE);
+bookmark.annotations.set("mystuff/rating", 5, NEVER_EXPIRE);
+
+alert(bookmark.annotations.get("mystuff/rating"));
+
+bookmark.annotations.remove("mystuff/rating");
+
+

参照

+ diff --git a/files/ja/toolkit_api/fuel/fueliapplication/index.html b/files/ja/toolkit_api/fuel/fueliapplication/index.html new file mode 100644 index 0000000000..f9be02826e --- /dev/null +++ b/files/ja/toolkit_api/fuel/fueliapplication/index.html @@ -0,0 +1,11 @@ +--- +title: fuelIApplication +slug: Toolkit_API/FUEL/fuelIApplication +tags: + - FUEL + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIApplication +--- +

この記事は extIApplication へ移動しました。

diff --git a/files/ja/toolkit_api/fuel/fuelibookmark/index.html b/files/ja/toolkit_api/fuel/fuelibookmark/index.html new file mode 100644 index 0000000000..40e46658fe --- /dev/null +++ b/files/ja/toolkit_api/fuel/fuelibookmark/index.html @@ -0,0 +1,107 @@ +--- +title: fuelIBookmark +slug: Toolkit_API/FUEL/fuelIBookmark +tags: + - FUEL + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIBookmark +--- +
+
+

メソッドの概要

+ + + + + + +
void remove()
+

属性

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
属性説明
idreadonly attribute long longブックマークの id。
titleattribute AStringブックマークのタイトル。
uriattribute nsIURIブックマークの URI。
descriptionattribute AStringブックマークの説明。
keywordattribute AStringブックマークに関連付けられたキーワード。
typereadonly attribute AStringブックマークの種類。値は "bookmark", "separator" のいずれか。
parentattribute fuelIBookmarkFolderブックマークの親フォルダ。
annotationsreadonly attribute fuelIAnnotationsブックマークに対する注釈オブジェクト。
eventsreadonly attribute extIEventsブックマークに対するイベントオブジェクト。 "remove", "change", "visit", "move" をサポート。
+

メソッド

+

remove()

+

アイテムを親フォルダから削除する。ブックマークや区切りを削除するために使う。

+
void remove()
+
+

引数

+

---

+

戻り値

+

---

+

+
const NEVER_EXPIRE = 0;
+
+function url(spec) {
+  var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
+  return ios.newURI(spec, null, null);
+}
+
+var bookmark = Application.bookmarks.toolbar.addBookmark("Mozilla", url("http://www.mozilla.com"));
+bookmark.keyword = "webdev";
+
+// check some properties
+alert(bookmark.title);     // should show "Mozilla"
+alert(bookmark.uri.spec);  // should show "http://www.mozilla.com"
+
+// setup an event to listen for changes to the bookmark
+bookmark.events.addListener("change", function(event) { alert(event.data); });
+
+bookmark.title = "MoCo";     // should alert "title"
+bookmark.keyword = "addons"; // should alert "keyword"
+
+

関連情報

+

---

diff --git a/files/ja/toolkit_api/fuel/fuelibookmarkfolder/index.html b/files/ja/toolkit_api/fuel/fuelibookmarkfolder/index.html new file mode 100644 index 0000000000..5fa27602ab --- /dev/null +++ b/files/ja/toolkit_api/fuel/fuelibookmarkfolder/index.html @@ -0,0 +1,135 @@ +--- +title: fuelIBookmarkFolder +slug: Toolkit_API/FUEL/fuelIBookmarkFolder +tags: + - FUEL + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIBookmarkFolder +--- +
+
+

メソッドの概要

+ + + + + + + + + + + + + + + +
fuelIBookmark addBookmark(in AString aTitle, in nsIURI aURI)
fuelIBookmark addSeparator()
fuelIBookmarkFolder addFolder(in AString aTitle)
void remove()
+

プロパティ

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
プロパティ説明
idreadonly attribute long longフォルダの id。
titleattribute AStringフォルダのタイトル。
descriptionattribute AStringフォルダの説明。
typereadonly attribute AStringフォルダの種類。値は "folder"。
parentattribute fuelIBookmarkFolderフォルダの親フォルダ。
annotationsreadonly attribute fuelIAnnotationsフォルダに対する注釈オブジェクト。
eventsreadonly attribute fuelIEventsフォルダに対するイベントオブジェクト。"add", "addchild", "remove", "removechild", "change", "move" をサポート。
childrenreadonly attribute nsIVariantこのフォルダに含まれるすべてのブックマーク、区切り、フォルダの配列。
+

メソッド

+

addBookmark()

+

このフォルダに新しい子のブックマークを追加する。

+
fuelIBookmark addBookmark(in AString aTitle, in nsIURI aURI)
+
+

引数

+
+
+ aTitle
+
+ ブックマークのタイトル。
+
+

戻り値

+

-

+

addSeparator()

+

このフォルダに新しい子の区切りを追加する。

+
fuelIBookmark addSeparator()
+
+

引数

+

-

+

戻り値

+

-

+

addFolder()

+

このフォルダに新しい子のフォルダを追加する。

+
fuelIBookmarkFolder addFolder(in AString aTitle)
+
+

引数

+
+
+ aTitle
+
+ The title of folder.
+
+

戻り値

+

-

+

remove()

+

親フォルダからフォルダを削除する。

+
void remove()
+
+

引数

+

-

+

戻り値

+

-

+

+
function url(spec) {
+  var ios = Cc["@mozilla.org/network/io-service;1"].getService( Ci.nsIIOService );
+  return ios.newURI( spec, null, null );
+}
+
+var bookmark = Application.bookmarks.toolbar.addBookmark( "Mozilla", url("http://www.mozilla.com") );
+

参照

+ diff --git a/files/ja/toolkit_api/fuel/fuelibookmarkroots/index.html b/files/ja/toolkit_api/fuel/fuelibookmarkroots/index.html new file mode 100644 index 0000000000..0043a1c18c --- /dev/null +++ b/files/ja/toolkit_api/fuel/fuelibookmarkroots/index.html @@ -0,0 +1,51 @@ +--- +title: fuelIBookmarkRoots +slug: Toolkit_API/FUEL/fuelIBookmarkRoots +tags: + - FUEL + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIBookmarkRoots +--- +
+
+

プロパティ

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
プロパティ説明
menureadonly attribute fuelIBookmarkFolderブックマークメニューのルート
toolbarreadonly attribute fuelIBookmarkFolderパーソナルツールバーのルート
tagsreadonly attribute fuelIBookmarkFolderタグのルート
unfiledreadonly attribute fuelIBookmarkFolder未整理のブックマークのルート
+

+
var bookmark = Application.bookmarks.unfiled.addBookmark("Test", testURI);
+
+

関連情報

+ diff --git a/files/ja/toolkit_api/fuel/fuelibrowsertab/index.html b/files/ja/toolkit_api/fuel/fuelibrowsertab/index.html new file mode 100644 index 0000000000..cfb5fa4765 --- /dev/null +++ b/files/ja/toolkit_api/fuel/fuelibrowsertab/index.html @@ -0,0 +1,140 @@ +--- +title: fuelIBrowserTab +slug: Toolkit_API/FUEL/fuelIBrowserTab +tags: + - FUEL + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIBrowserTab +--- +

+

FUEL の BrowserTab オブジェクトは、ブラウザ内のタブを記述します。

+

メソッドの概要

+ + + + + + + + + + + + + + + + + + +
void load(in nsIURI aURI)
void focus()
void close()
void moveBefore(in fuelIBrowserTab aBefore)
void moveToEnd()
+

プロパティ

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
プロパティ説明
urireadonly attribute nsIURIこのタブの現在の URI。
indexreadonly attribute PRInt32ブラウザウィンドウ内のこのタブの現在のインデックス。
windowreadonly attribute fuelIWindowこのタブを有するブラウザウィンドウ。
documentreadonly attribute nsIDOMHTMLDocumentブラウザタブの内容ドキュメント 【訳注: 原文は "content document"】。DOM リファレンスの Document オブジェクトを参照。
eventsreadonly attribute fuelIEventsブラウザタブに対するイベントオブジェクト。 "load" をサポート。
+

メソッド

+

load()

+

このブラウザタブに新しい URI を読み込む。

+
void load(
+  in nsIURI aURI
+);
+
+
引数
+
+
+ aURI
+
+ ブラウザタブに読み込む URI。
+
+

focus()

+

このブラウザタブにフォーカスを移し、前面に表示する。

+
void focus();
+
+
引数
+

なし。

+

close()

+

ブラウザタブを閉じる。スクリプトによって閉じる操作が中止される場合、実際には閉じない。

+
void close()
+
+
引数
+

None.

+

moveBefore()

+

このブラウザタブを同じウィンドウ内の別のブラウザタブの前の位置に移動する。

+
void moveBefore(
+  in fuelIBrowserTab aBefore
+);
+
+
引数
+
+
+ aBefore
+
+ 移動するタブの前にある移動先のタブ。
+
+

moveToEnd()

+

このブラウザタブを同じウィンドウの末尾へ移動する。

+
void moveToEnd();
+
+
引数
+

なし。

+

+

ウィンドウ内のタブに対して操作を繰り返す

+

この例は、現在アクティブなブラウザウィンドウ内のすべてのタブに対する操作を行い、各タブに対してアラートを表示します。

+
var activeWin = Application.activeWindow;
+
+// アクティブなブラウザウィンドウ内に開かれた各タブを調べる
+activeWin.tabs.forEach( function(tab) {
+  alert(tab.uri.spec);
+});
+
+

タブ内の Web コンテンツにアクセスする

+

この例は、アクティブなタブから HTML コンテンツを取得します。

+
// アクティブなタブの内容ドキュメントへアクセスする
+alert(activeWin.activeTab.document.body.innerHTML);
+
+

新しいタブを開いてコンテンツを挿入する

+

この例は、アクティブなウィンドウ内に新しいタブを作成し、そのタブに何らかの HTML コンテンツを挿入します。

+
// 文字列から nsURI を生成するヘルパー
+function url(spec) {
+  var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
+  return ios.newURI(spec, null, null);
+}
+
+// 新しいタブを開き、内容を変更する
+newTab = Application.activeWindow.open(url("about:blank"));
+newTab.events.addListener("load", function() { newTab.document.body.innerHTML = "<H1>HelloWorld</H1>"; });
+
+

 

diff --git a/files/ja/toolkit_api/fuel/fueliwindow/index.html b/files/ja/toolkit_api/fuel/fueliwindow/index.html new file mode 100644 index 0000000000..3f122f82fa --- /dev/null +++ b/files/ja/toolkit_api/fuel/fueliwindow/index.html @@ -0,0 +1,82 @@ +--- +title: fuelIWindow +slug: Toolkit_API/FUEL/fuelIWindow +tags: + - FUEL + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIWindow +--- +
+
+

FUELWindow オブジェクトは、ブラウザウィンドウを記述します。

+

メソッドの概要

+ + + + + + +
fuelIBrowserTab open(in nsIURI aURI)
+

プロパティ

+ + + + + + + + + + + + + + + + + + + + + + + +
プロパティ説明
tabsreadonly attribute nsIVariantブラウザウィンドウ内のブラウザタブ (fuelIBrowserTab) の配列。この配列は、開いているタブのスナップショットです。配列の値を変更してもブラウザ内のタブには影響しません。タブを操作するには、このページに書かれた fuelIWindow.open() メソッドを使用するか、fuelIBrowserTab のメソッドを使用してください。
activeTabreadonly attribute fuelIBrowserTabブラウザウィンドウ内の現在アクティブなタブ。
eventsreadonly attribute fuelIEventsブラウザウィンドウに対するイベントオブジェクト。 "TabOpen", "TabClose", "TabMove", "TabSelect" をサポート。
+

メソッド

+

open()

+

指定した URI を新しいブラウザタブに開く。

+
fuelIBrowserTab open(
+  in nsIURI aURI
+);
+
+

引数

+
+
+ aURI
+
+ 新しいブラウザタブに読み込む URI。
+
+

+

この例は、"TabOpen" イベントを監視するイベントリスナーをセットアップします。このイベントは、新しいタブが作成された時に送信され、次に新しいウィンドウが開き、Mozilla の Web サイトが読み込まれます。Mozilla のサイトが読み込まれるタブが作成された時、コード例の onTabOpen() メソッドが呼び出されます。

+

この例は、いくつかの役立つテクニックをデモします。ウィンドウに新しいタブを作成する方法と新しく開かれたタブへの参照を取得する方法です。

+
// 文字列から nsIURI オブジェクトを生成するヘルパー関数
+function url(spec) {
+  var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
+  return ios.newURI(spec, null, null);
+}
+
+function onTabOpen(event) {
+  // タブが読み込まれる前にイベントが呼び出されるため、alert は動作しないことに注意してください。
+  var theTab = event.data.tab;    // タブの FUEL BrowserTab オブジェクトを取得
+  Application.console.log("It opened");
+}
+
+var activeWin = Application.activeWindow;
+activeWin.events.addListener("TabOpen", onTabOpen);
+
+var browserTab = activeWin.open(url("http://mozilla.org"));
+
+

関連情報

+

---

diff --git a/files/ja/toolkit_api/fuel/index.html b/files/ja/toolkit_api/fuel/index.html new file mode 100644 index 0000000000..bbc7cf10f2 --- /dev/null +++ b/files/ja/toolkit_api/fuel/index.html @@ -0,0 +1,44 @@ +--- +title: FUEL +slug: Toolkit_API/FUEL +tags: + - FUEL + - Firefox + - Interfaces + - XPCOM + - XPCOM API Reference +translation_of: Mozilla/Tech/Toolkit_API/FUEL +--- +
+ {{ Fx_minversion_header(3) }}
+

FUEL は、開発者が構築する拡張機能を助けるために、彼らに親しみのある用語とインタフェースを使用してデザインされた JavaScript ライブラリです。FUEL は Firefox 3 の新機能です。

+

FUEL は、XPCOM の形式的な部分を少なくし、"モダンな" JavaScript のアイデアを追加することによって、拡張機能の開発者の負担を減らしながら生産的にします。私たちは最も利点のある領域の提供からはじめようとしています。

+

FUEL は、extIApplication のすべての関数を実装する fuelIApplication インタフェースを持っています。このライブラリは、Thunderbird ("STEEL") と SeaMonkey ("SMILE") にも実装されています。

+

オブジェクト

+

extIApplication オブジェクト

+ +

fuelIApplication オブジェクト

+ +

XPCOM

+

FUEL Application オブジェクトは XUL スクリプトにプリロードされますが、JavaScript XPCOM コードにはプリロードされません。オブジェクトへは他の XPCOM サービスのようにアクセスする必要があります:

+
var Application = Components.classes["@mozilla.org/fuel/application;1"].getService(Components.interfaces.fuelIApplication);
+
-- cgit v1.2.3-54-g00ecf