nsINavHistoryResultObserver

  • Revision slug: nsINavHistoryResultObserver
  • Revision title: nsINavHistoryResultObserver
  • Revision id: 57238
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 29 words added, 38 words removed

Revision Content

{{ IFSummary("toolkit/components/places/public/nsINavHistoryService.idl", "nsISupports", "scriptable", "2.0", "Lets clients observe changes to a result as the result updates itself according to bookmark and history system events.", "2.0") }}

Note: In Gecko 2.0 {{ geckoRelease("2.0") }}, this interface replaced the older {{ interface("nsINavHistoryResultViewer") }} interface, which only allowed one client at a time.

Inherits from: {{ Interface("nsISupports") }}

Method overview

void containerClosed(in nsINavHistoryContainerResultNode aContainerNode); {{ deprecated_inline("2.0") }}
void containerOpened(in nsINavHistoryContainerResultNode aContainerNode); {{ deprecated_inline("2.0") }}
void containerStateChanged(in nsINavHistoryContainerResultNode aContainerNode, in unsigned long aOldState, in unsigned long aNewState); {{ gecko_minversion_inline("2.0") }}
void invalidateContainer(in nsINavHistoryContainerResultNode aContainerNode);
void nodeAnnotationChanged(in nsINavHistoryResultNode aNode, in AUTF8String aAnnoName); {{ gecko_minversion_inline("1.9.2") }}
void nodeDateAddedChanged(in nsINavHistoryResultNode aNode, in PRTime aNewValue); {{ gecko_minversion_inline("1.9.2") }}
void nodeLastAddedChanged(in nsINavHistoryResultNode aNode, in PRTime aNewValue); {{ gecko_minversion_inline("1.9.2") }}
void nodeHistoryDetailsChanged(in nsINavHistoryResultNode aNode, in PRTime aNewVisitDate, in unsigned long aNewAccessCount); {{ gecko_minversion_inline("1.9.2") }}
void nodeIconChanged(in nsINavHistoryResultNode aNode); {{ gecko_minversion_inline("1.9.2") }}
void nodeKeywordChanged(in nsINavHistoryResultNode aNode, in AUTF8String aNewKeyword); {{ gecko_minversion_inline("1.9.2") }}
void nodeMoved(in nsINavHistoryResultNode aNode, in nsINavHistoryContainerResultNode aOldParent, in unsigned long aOldIndex, in nsINavHistoryContainerResultNode aNewParent, in unsigned long aNewIndex);
void nodeTitleChanged(in nsINavHistoryResultNode aNode, in AUTF8String aNewTitle); {{ gecko_minversion_inline("1.9.2") }}
void nodeRemoved(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode, in unsigned long aOldIndex);
void nodeTagsChanged(in nsINavHistoryResultNode aNode); {{ gecko_minversion_inline("1.9.2") }}
void nodeURIChanged(in nsINavHistoryResultNode aNode, in AUTF8String aNewURI); {{ gecko_minversion_inline("1.9.2") }}
void nodeReplaced(in nsINavHistoryContainerResultNode parent, in nsINavHistoryResultNode oldItem, in nsINavHistoryResultNode newItem, in unsigned long index);
void nodeInserted(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode , in unsigned long aNewIndex);
void sortingChanged(in unsigned short sortingMode);

Attributes

Attribute Type Description
result nsINavHistoryResult The nsINavHistoryResult this observer monitors. Although this attribute is read-write, you should not alter it directly; instead, call {{ ifmethod("nsINavHistoryResult", "addObserver") }} to add an observer to a result.

Methods

{{ method_deprecated("containerClosed") }}

Called when a container node's state changes from closed to opened.

Note: This method was deprecated in Gecko 2.0 {{ geckoRelease("2.0") }}. Implement the {{ manch("containerStateChanged") }} method instead.
 void containerClosed(
   in nsINavHistoryContainerResultNode aContainerNode
 );
Parameters
aContainerNode
The container node whose state changed.

{{ method_deprecated("containerOpened") }}

Called when a container node's state changes from closed to opened.

Note: This method was deprecated in Gecko 2.0 {{ geckoRelease("2.0") }}. Implement the {{ manch("containerStateChanged") }} method instead.
 void containerOpened(
   in nsINavHistoryContainerResultNode aContainerNode
 );
Parameters
aContainerNode
The container node whose state changed.

{{ method_gecko_minversion("containerStateChanged", "2.0") }}

Called when a container node's state changes.

void containerStateChanged(
  in nsINavHistoryContainerResultNode aContainerNode,
  in unsigned long aOldState,
  in unsigned long aNewState
);
Parameters
aContainerNode
The container node whose state changed.
aOldState
The prior state of the node; this will be one of the state constants.
aNewState
The new state of the node; this is one of the state constants.

invalidateContainer()

Called when something has happened that requires that the contents of a container be rebuilt.

void invalidateContainer(
  in nsINavHistoryContainerResultNode aContainerNode
);
Parameters
aContainerNode
The container that should be rebuilt.

{{ method_gecko_minversion("nodeAnnotationChanged", "1.9.2") }}

Called right after the annotation on a node has changed. This is called when the annotation is changed, set, or unset.

void nodeAnnotationChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aAnnoName
);
Parameters
aNode
The node whose title has changed.
aAnnoName
The name of the annotation that hanged.

{{ method_gecko_minversion("nodeDateAddedChanged", "1.9.2") }}

Called right after the date added property of a node has changed.

void nodeKeywordChanged(
  in nsINavHistoryResultNode aNode,
  in PRTime aNewValue
);
Parameters
aNode
The node whose title has changed.
aNewValue
The new value for the node's date added property.

{{ method_gecko_minversion("nodeLastModifiedChanged", "1.9.2") }}

Called right after the last modified date property of a node has changed.

void nodeKeywordChanged(
  in nsINavHistoryResultNode aNode,
  in PRTime aNewValue
);
Parameters
aNode
The node whose title has changed.
aNewValue
The new value for the node's last modified property.

{{ method_gecko_minversion("nodeHistoryDetailsChanged", "1.9.2") }}

Called right after a node's last access time or access count has changed.

void nodeHistoryDetailsChanged(
  in nsINavHistoryResultNode aNode,
  in PRTime aNewVisitDate,
  in unsigned long aNewAccessCount
);
Parameters
aNode
The node whose details have changed.
aNewVisitDate
The new value for the last visit date and time for the node.
aNewAccessCount
The new access count value for the node.

{{ method_gecko_minversion("nodeIconChanged", "1.9.2") }}

Called right after the icon of a node has changed.

void nodeIconChanged(
  in nsINavHistoryResultNode aNode
);
Parameters
aNode
The node whose icon has changed.

{{ method_gecko_minversion("nodeKeywordChanged", "1.9.2") }}

Called right after the keyword property of a node has changed.

void nodeKeywordChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aNewKeyword
);
Parameters
aNode
The node whose title has changed.
aNewTitle
The new value for the node's keyword property.

nodeMoved()

Called when a node is moved from aOldParent at aOldIndex to aNewParent at aNewIndex. The item may be a container or a leaf.

void itemMoved(
  in nsINavHistoryResultNode aNode,
  in nsINavHistoryContainerResultNode aOldParent,
  in unsigned long aOldIndex,
  in nsINavHistoryContainerResultNode aNewParent,
  in unsigned long aNewIndex
);
Parameters
aNode
The moved item.
aOldParent
The item's old parent.
aOldIndex
The item's index in the old parent.
aNewParent
The item's new parent.
aNewIndex
The item's index in the new parent.
Remarks

At the moment, this method is called only when an item is moved within the same container. When an item is moved between containers, a new node is created for the item, and the itemRemoved/itemAdded methods are used.

{{ method_gecko_minversion("nodeTitleChanged", "1.9.2") }}

Called right after the title of a node has changed.

void nodeTitleChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aNewTitle
);
Parameters
aNode
The node whose title has changed.
aNewTitle
The new title of the node.

{{ method_gecko_minversion("nodeURIChanged", "1.9.2") }}

Called right after the URI of a node has changed.

void nodeURIChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aNewURI
);
Parameters
aNode
The node whose title has changed.
aNewURI
The node's new URI.

nodeRemoved()

Called when a node is removed from a container.

 void itemRemoved(
   in nsINavHistoryContainerResultNode aParent,
   in nsINavHistoryResultNode aNode,
   in unsigned long aOldIndex
 );
Parameters
parent
The container from which the item was removed.
item
The item that was removed from the container. It may be either a container or a leaf.
oldIndex
The index from which the item was removed.
Remarks

This method is called after the item has been removed from the parent, but before any other action is taken (including zeroing out the item's parent reference).

{{ method_gecko_minversion("nodeTagsChanged", "1.9.2") }}

Called right after a node's tags have changed.

void nodeTagsChanged(
  in nsINavHistoryResultNode aNode
);
Parameters
aNode
The node whose tags have changed.

nodeReplaced()

Called when a node is being replaced with another node at the same location.

 void nodeReplaced(in nsINavHistoryContainerResultNode aParentNode,
   in nsINavHistoryResultNode aOldNode,
   in nsINavHistoryResultNode aNewNode,
   in unsigned long aIndex
 );
Parameters
aParentNode
The container in which the item is being replaced.
aOldNode
The item being replaced.
aNewNode
The node replacing the aOldNode.
aIndex
The index at which the node is located in the container.

nodeInserted()

Called when an item is inserted into a container.

 void nodeInserted(
   in nsINavHistoryContainerResultNode aParent,
   in nsINavHistoryResultNode aNode,
   in unsigned long aNewIndex
 );
Parameters
aParent
The container into which to insert the item.
aNode
The node to insert into the container; it may be either a leaf or another container.
aNewIndex
The index at which to insert the item.
Remarks

The item previously at the specified index (if any) as well as everything below it, is shifted down by one.

sortingChanged()

Called when the sorting order is changed to a particular mode. For trees, this would update the column headers to reflect the altered sorting.

 void sortingChanged(
   in unsigned short sortingMode
 );
Parameters
sortingMode
One of the nsINavHistoryQueryOptions.SORT_BY_* constants, indicating the softing mode.
Remarks

This method is only called to update the sorting user interface. {{ mediawiki.external('#invalidateAll()') }} is called as well if the sorting changes, in order to cause the contents to update properly.

See also

{{ Interface("nsINavHistoryResult") }}, {{ Interface("nsITreeView") }}, Displaying Places information using views

Revision Source

<p>{{ IFSummary("toolkit/components/places/public/nsINavHistoryService.idl", "nsISupports", "scriptable", "2.0", "Lets clients observe changes to a result as the result updates itself according to bookmark and history system events.", "2.0") }}</p>
<div class="note"><strong>Note:</strong> In Gecko 2.0 {{ geckoRelease("2.0") }}, this interface replaced the older {{ interface("nsINavHistoryResultViewer") }} interface, which only allowed one client at a time.</div>
<p>Inherits from: {{ Interface("nsISupports") }}</p>
<h2 name="Method_overview">Method overview</h2>
<table class="standard-table"> <tbody> <tr> <td><code>void <a href="/en/nsINavHistoryResultObserver#containerClosed.28.29" title="en/nsINavHistoryResultObserver#containerClosed.28.29">containerClosed</a>(in nsINavHistoryContainerResultNode aContainerNode);</code> {{ deprecated_inline("2.0") }}</td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultObserver#containerOpened.28.29" title="en/nsINavHistoryResultObserver#containerOpened.28.29">containerOpened</a>(in nsINavHistoryContainerResultNode aContainerNode); </code>{{ deprecated_inline("2.0") }}</td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultObserver#containerStateChanged()" title="en/nsINavHistoryResultObserver#containerStateChanged()">containerStateChanged</a>(in nsINavHistoryContainerResultNode aContainerNode, in unsigned long aOldState, in unsigned long aNewState);</code> {{ gecko_minversion_inline("2.0") }}</td> </tr> <tr> <td><code>void <a href="/fckeditor.html?InstanceName=editarea&amp;Toolbar=MDC#invalidateContainer.28.29" title="fckeditor.html?InstanceName=editarea&amp;Toolbar=MDC#invalidateContainer.28.29">invalidateContainer</a>(in nsINavHistoryContainerResultNode aContainerNode);</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeAnnotationChanged%28%29" title="en/nsINavHistoryResultViewer#nodeAnnotationChanged()">nodeAnnotationChanged</a>(in nsINavHistoryResultNode aNode, in AUTF8String aAnnoName);</code><code> {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeDateAddedChanged%28%29" title="en/nsINavHistoryResultViewer#nodeDateAddedChanged()">nodeDateAddedChanged</a>(in nsINavHistoryResultNode aNode, in PRTime aNewValue); {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeLastAddedChanged%28%29" title="en/nsINavHistoryResultViewer#nodeLastAddedChanged()">nodeLastAddedChanged</a>(in nsINavHistoryResultNode aNode, in PRTime aNewValue); {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeHistoryDetailsChanged%28%29" title="en/nsINavHistoryResultViewer#nodeHistoryDetailsChanged()">nodeHistoryDetailsChanged</a>(in nsINavHistoryResultNode aNode, in PRTime aNewVisitDate, in unsigned long aNewAccessCount);</code><code> {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeIconChanged%28%29" title="en/nsINavHistoryResultViewer#nodeIconChanged()">nodeIconChanged</a>(in nsINavHistoryResultNode aNode);</code><code> {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeKeywordChanged%28%29" title="en/nsINavHistoryResultViewer#nodeKeywordChanged()">nodeKeywordChanged</a>(in nsINavHistoryResultNode aNode, in AUTF8String aNewKeyword);</code><code> {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void </code><a href="/#nodeMoved%28%29" title="#nodeMoved()"><code>nodeMoved</code></a><code>(in nsINavHistoryResultNode aNode, in nsINavHistoryContainerResultNode aOldParent, in unsigned long aOldIndex, in nsINavHistoryContainerResultNode aNewParent, in unsigned long aNewIndex);</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeTitleChanged%28%29" title="en/nsINavHistoryResultViewer#nodeTitleChanged()">nodeTitleChanged</a>(in nsINavHistoryResultNode aNode, in AUTF8String aNewTitle); {{ gecko_minversion_inline("1.9.2") }}<br> </code></td> </tr> <tr> <td><code>void <a href="/#nodeRemoved.28.29" title="#nodeRemoved.28.29">nodeRemoved</a>(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode, in unsigned long aOldIndex);</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeTagsChanged%28%29" title="en/nsINavHistoryResultViewer#nodeTagsChanged()">nodeTagsChanged</a>(in nsINavHistoryResultNode aNode);</code><code> {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/en/nsINavHistoryResultViewer#nodeURIChanged%28%29" title="en/nsINavHistoryResultViewer#nodeURIChanged()">nodeURIChanged</a>(in nsINavHistoryResultNode aNode, in AUTF8String aNewURI);</code><code> {{ gecko_minversion_inline("1.9.2") }}</code></td> </tr> <tr> <td><code>void <a href="/#nodeReplaced.28.29" title="#nodeReplaced.28.29">nodeReplaced</a>(in nsINavHistoryContainerResultNode parent, in nsINavHistoryResultNode oldItem, in nsINavHistoryResultNode newItem, in unsigned long index);</code></td> </tr> <tr> <td><code>void <a href="/#nodeInserted.28.29" title="#nodeInserted.28.29">nodeInserted</a>(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode , in unsigned long aNewIndex);</code></td> </tr> <tr> <td><code>void <a href="/fckeditor.html?InstanceName=editarea&amp;Toolbar=MDC#sortingChanged.28.29" title="fckeditor.html?InstanceName=editarea&amp;Toolbar=MDC#sortingChanged.28.29">sortingChanged</a>(in unsigned short sortingMode);</code></td> </tr> </tbody>
</table>
<h2>Attributes</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Attribute</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code>result</code></td> <td><code>nsINavHistoryResult</code></td> <td>The <code><a href="/en/nsINavHistoryResult" title="en/nsINavHistoryResult">nsINavHistoryResult</a></code> this observer monitors. Although this attribute is read-write, you should not alter it directly; instead, call {{ ifmethod("nsINavHistoryResult", "addObserver") }} to add an observer to a result.</td> </tr> </tbody>
</table>
<h2 name="Methods">Methods</h2>
<p>{{ method_deprecated("containerClosed") }}</p>
<p>Called when a container node's state changes from closed to opened.</p>
<div class="note"><strong>Note:</strong> This method was deprecated in Gecko 2.0 {{ geckoRelease("2.0") }}. Implement the {{ manch("containerStateChanged") }} method instead.</div>
<pre class="eval"> void containerClosed(
   in nsINavHistoryContainerResultNode aContainerNode
 );
</pre>
<h6 name="Parameters_2">Parameters</h6>
<dl> <dt><code>aContainerNode</code></dt> <dd>The container node whose state changed.</dd>
</dl>
<p>{{ method_deprecated("containerOpened") }}</p>
<p>Called when a container node's state changes from closed to opened.</p>
<div class="note"><strong>Note:</strong> This method was deprecated in Gecko 2.0 {{ geckoRelease("2.0") }}. Implement the {{ manch("containerStateChanged") }} method instead.</div>
<pre class="eval"> void containerOpened(
   in nsINavHistoryContainerResultNode aContainerNode
 );
</pre>
<h6 name="Parameters_3">Parameters</h6>
<dl> <dt><code>aContainerNode</code></dt> <dd>The container node whose state changed.</dd>
</dl>
<p>{{ method_gecko_minversion("containerStateChanged", "2.0") }}</p>
<p>Called when a container node's state changes.</p>
<pre>void containerStateChanged(
  in nsINavHistoryContainerResultNode aContainerNode,
  in unsigned long aOldState,
  in unsigned long aNewState
);
</pre>
<h6>Parameters</h6>
<dl> <dt><code>aContainerNode</code></dt> <dd>The container node whose state changed.</dd> <dt><code>aOldState</code></dt> <dd>The prior state of the node; this will be one of the <a href="/en/nsINavHistoryContainerResultNode#State_constants" title="en/nsINavHistoryContainerResultNode#State constants">state constants</a>.</dd> <dt><code>aNewState</code></dt> <dd>The new state of the node; this is one of the <a href="/en/nsINavHistoryContainerResultNode#State_constants" title="en/nsINavHistoryContainerResultNode#State constants">state constants</a>.</dd>
</dl>
<h3 name="invalidateContainer.28.29">invalidateContainer()</h3>
<p>Called when something has happened that requires that the contents of a container be rebuilt.</p>
<pre class="eval">void invalidateContainer(
  in nsINavHistoryContainerResultNode aContainerNode
);
</pre>
<h6 name="Parameters_9">Parameters</h6>
<dl> <dt><code>aContainerNode</code></dt> <dd>The container that should be rebuilt.</dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeAnnotationChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the annotation on a node has changed. This is called when the annotation is changed, set, or unset.<br>
</span></p>
<pre><span class="c">void nodeAnnotationChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in AUTF8String aAnnoName<br>);</span> </pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose title has changed.</span></dd> <dt><code><span class="c">aAnnoName</span></code></dt> <dd><span class="c">The name of the annotation that hanged.</span></dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeDateAddedChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the date added property of a node has changed.</span></p>
<pre><span class="c">void nodeKeywordChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in PRTime aNewValue<br>);</span> </pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose title has changed.</span></dd> <dt><code><span class="c">aNewValue</span></code></dt> <dd><span class="c">The new value for the node's date added property.</span></dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeLastModifiedChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the last modified date property of a node has changed.</span></p>
<pre><span class="c">void nodeKeywordChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in PRTime aNewValue<br>);</span> </pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose title has changed.</span></dd> <dt><code><span class="c">aNewValue</span></code></dt> <dd><span class="c">The new value for the node's last modified property.</span></dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeHistoryDetailsChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after a node's last access time or access count has changed.</span></p>
<pre><span class="c">void nodeHistoryDetailsChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in PRTime aNewVisitDate,<br>  in unsigned long aNewAccessCount<br>);</span> 
</pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose details have changed.</span></dd> <dt><code><span class="c">aNewVisitDate</span></code></dt> <dd><span class="c">The new value for the last visit date and time for the node.</span></dd> <dt><code><span class="c">aNewAccessCount</span></code></dt> <dd><span class="c">The new access count value for the node.</span></dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeIconChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the icon of a node has changed.</span></p>
<pre><span class="c">void nodeIconChanged(<br>  in nsINavHistoryResultNode aNode<br>);</span> 
</pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose icon has changed.</span></dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeKeywordChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the keyword property of a node has changed.</span></p>
<pre><span class="c">void nodeKeywordChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in AUTF8String aNewKeyword<br>);</span> </pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose title has changed.</span></dd> <dt><code><span class="c">aNewTitle</span></code></dt> <dd><span class="c">The new value for the node's keyword property.</span></dd>
</dl>
<h3 name="itemRemoved.28.29">nodeMoved()</h3>
<p><span class="c">Called when a node is moved from <code>aOldParent</code> at <code>aOldIndex</code> to</span><span class="c"> <code>aNewParent</code> at <code>aNewIndex</code>. The item may be a container or a leaf.</span></p>
<pre>void itemMoved(
  in nsINavHistoryResultNode aNode,
  in nsINavHistoryContainerResultNode aOldParent,
  in unsigned long aOldIndex,
  in nsINavHistoryContainerResultNode aNewParent,
  in unsigned long aNewIndex
);
</pre>
<h6>Parameters</h6>
<dl> <dt><code>aNode</code></dt> <dd>The moved item.</dd> <dt><code>aOldParent</code></dt> <dd>The item's old parent.</dd> <dt><code>aOldIndex</code></dt> <dd>The item's index in the old parent.</dd> <dt><code>aNewParent</code></dt> <dd>The item's new parent.</dd> <dt><code>aNewIndex</code></dt> <dd>The item's index in the new parent.</dd>
</dl>
<h6>Remarks</h6>
<p>A<span class="c">t the moment, this method is called only when an item is moved</span><span class="c"> within the same container. When an item is moved between containers,</span><span class="c"> a new node is created for the item, and the itemRemoved/itemAdded methods</span><span class="c"> are used.</span></p>
<p><span class="c">{{ method_gecko_minversion("nodeTitleChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the title of a node has changed.</span></p>
<pre><span class="c">void nodeTitleChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in AUTF8String aNewTitle<br>);</span> </pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose title has changed.</span></dd> <dt><code><span class="c">aNewTitle</span></code></dt> <dd><span class="c">The new title of the node.</span></dd>
</dl>
<p><span class="c">{{ method_gecko_minversion("nodeURIChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after the URI of a node has changed.</span></p>
<pre><span class="c">void nodeURIChanged(<br>  in nsINavHistoryResultNode aNode,<br>  in AUTF8String aNewURI<br>);</span> </pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose title has changed.</span></dd> <dt><code><span class="c">aNewURI</span></code></dt> <dd><span class="c">The node's new URI.</span></dd>
</dl>
<h3 name="itemRemoved.28.29">nodeRemoved()</h3>
<p>Called when a node is removed from a container.</p>
<pre class="eval"> void itemRemoved(
   in nsINavHistoryContainerResultNode aParent,
   in nsINavHistoryResultNode aNode,
   in unsigned long aOldIndex
 );
</pre>
<h6 name="Parameters_5">Parameters</h6>
<dl> <dt><code>parent</code></dt> <dd>The container from which the item was removed.</dd> <dt><code>item</code></dt> <dd>The item that was removed from the container. It may be either a container or a leaf.</dd> <dt><code>oldIndex</code></dt> <dd>The index from which the item was removed.</dd>
</dl>
<h6 name="Remarks_2">Remarks</h6>
<p>This method is called after the item has been removed from the parent, but before any other action is taken (including zeroing out the item's parent reference).</p>
<p><span class="c">{{ method_gecko_minversion("nodeTagsChanged", "1.9.2") }}</span></p>
<p><span class="c">Called right after a node's tags have changed.</span></p>
<pre><span class="c">void nodeTagsChanged(<br>  in nsINavHistoryResultNode aNode<br>);</span> 
</pre>
<h6><span class="c">Parameters</span></h6>
<dl> <dt><code><span class="c">aNode</span></code></dt> <dd><span class="c">The node whose tags have changed.</span></dd>
</dl>
<h3 name="itemReplaced.28.29">nodeReplaced()</h3>
<p>Called when a node is being replaced with another node at the same location.</p>
<pre class="eval"> void nodeReplaced(in nsINavHistoryContainerResultNode aParentNode,
   in nsINavHistoryResultNode aOldNode,
   in nsINavHistoryResultNode aNewNode,
   in unsigned long aIndex
 );
</pre>
<h6 name="Parameters_7">Parameters</h6>
<dl> <dt><code>aParentNode</code></dt> <dd>The container in which the item is being replaced.</dd> <dt><code>aOldNode</code></dt> <dd>The item being replaced.</dd> <dt><code>aNewNode</code></dt> <dd>The node replacing the <code>aOldNode</code>.</dd> <dt><code>aIndex</code></dt> <dd>The index at which the node is located in the container.</dd>
</dl>
<h3 name="itemInserted.28.29">nodeInserted()</h3>
<p>Called when an item is inserted into a container.</p>
<pre class="eval"> void nodeInserted(
   in nsINavHistoryContainerResultNode aParent,
   in nsINavHistoryResultNode aNode,
   in unsigned long aNewIndex
 );
</pre>
<h6 name="Parameters_4">Parameters</h6>
<dl> <dt><code>aParent</code></dt> <dd>The container into which to insert the item.</dd> <dt><code>aNode</code></dt> <dd>The node to insert into the container; it may be either a leaf or another container.</dd> <dt><code>aNewIndex</code></dt> <dd>The index at which to insert the item.</dd>
</dl>
<h6 name="Remarks">Remarks</h6>
<p>The item previously at the specified index (if any) as well as everything below it, is shifted down by one.</p>
<h3 name="sortingChanged.28.29">sortingChanged()</h3>
<p>Called when the sorting order is changed to a particular mode. For trees, this would update the column headers to reflect the altered sorting.</p>
<pre class="eval"> void sortingChanged(
   in unsigned short sortingMode
 );
</pre>
<h6 name="Parameters_11">Parameters</h6>
<dl> <dt><code>sortingMode</code></dt> <dd>One of the <code>nsINavHistoryQueryOptions.SORT_BY_*</code> constants, indicating the softing mode.</dd>
</dl>
<h6 name="Remarks_3">Remarks</h6>
<p>This method is only called to update the sorting user interface. <code>{{ mediawiki.external('#invalidateAll()') }}</code> is called as well if the sorting changes, in order to cause the contents to update properly.</p>
<h2 name="See_also">See also</h2>
<p>{{ Interface("nsINavHistoryResult") }}, {{ Interface("nsITreeView") }}, <a class="internal" href="/en/Displaying_Places_information_using_views" title="En/Displaying Places information using views">Displaying Places information using views</a></p>
Revert to this revision