blob: 40e46658feb5f05d103e5df04a67e013b94459ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
---
title: fuelIBookmark
slug: Toolkit_API/FUEL/fuelIBookmark
tags:
- FUEL
- Interfaces
- XPCOM
- XPCOM API Reference
translation_of: Mozilla/Tech/Toolkit_API/FUEL/fuelIBookmark
---
<div>
</div>
<h2 id="Method_overview" name="Method_overview">メソッドの概要</h2>
<table class="standard-table">
<tbody>
<tr>
<td><code>void <a href="#remove.28.29">remove</a>()</code></td>
</tr>
</tbody>
</table>
<h2 id="Attributes" name="Attributes">属性</h2>
<table class="standard-table">
<tbody>
<tr>
<td class="header">属性</td>
<td class="header">型</td>
<td class="header">説明</td>
</tr>
<tr>
<td><code>id</code></td>
<td><code>readonly attribute long long</code></td>
<td>ブックマークの id。</td>
</tr>
<tr>
<td><code>title</code></td>
<td><code>attribute AString</code></td>
<td>ブックマークのタイトル。</td>
</tr>
<tr>
<td><code>uri</code></td>
<td><code>attribute nsIURI</code></td>
<td>ブックマークの URI。</td>
</tr>
<tr>
<td><code>description</code></td>
<td><code>attribute AString</code></td>
<td>ブックマークの説明。</td>
</tr>
<tr>
<td><code>keyword</code></td>
<td><code>attribute AString</code></td>
<td>ブックマークに関連付けられたキーワード。</td>
</tr>
<tr>
<td><code>type</code></td>
<td><code>readonly attribute AString</code></td>
<td>ブックマークの種類。値は "bookmark", "separator" のいずれか。</td>
</tr>
<tr>
<td><code>parent</code></td>
<td><code>attribute fuelIBookmarkFolder</code></td>
<td>ブックマークの親フォルダ。</td>
</tr>
<tr>
<td><code>annotations</code></td>
<td><code>readonly attribute fuelIAnnotations</code></td>
<td>ブックマークに対する注釈オブジェクト。</td>
</tr>
<tr>
<td><code>events</code></td>
<td><code>readonly attribute extIEvents</code></td>
<td>ブックマークに対するイベントオブジェクト。 "remove", "change", "visit", "move" をサポート。</td>
</tr>
</tbody>
</table>
<h2 id="Methods" name="Methods">メソッド</h2>
<h3 id="remove.28.29" name="remove.28.29">remove()</h3>
<p>アイテムを親フォルダから削除する。ブックマークや区切りを削除するために使う。</p>
<pre class="eval">void remove()
</pre>
<h4 id="Parameters" name="Parameters">引数</h4>
<p>---</p>
<h4 id="Return_value" name="Return_value">戻り値</h4>
<p>---</p>
<h2 id="Examples" name="Examples">例</h2>
<pre>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"
</pre>
<h2 id="See_also" name="See_also">関連情報</h2>
<p>---</p>
|