Office.NodeDeletedEventArgs interface
Provides information about the deleted node that raised the nodeDeleted event.
Remarks
Examples
// Event handler for the NodeDeleted event added in CustomXmlPart.addHandlerAsync.
function onNodeDeleted(eventArgs: Office.NodeDeletedEventArgs) {
// Logs information about the deleted node and its former sibling.
console.log("NodeDeleted event fired.");
console.log(" Is undo/redo: " + eventArgs.isUndoRedo);
eventArgs.oldNode.getXmlAsync((result) => {
if (result.status === Office.AsyncResultStatus.Succeeded) {
console.log(" Deleted node XML: " + result.value);
}
});
if (eventArgs.oldNextSibling) {
eventArgs.oldNextSibling.getXmlAsync((result) => {
if (result.status === Office.AsyncResultStatus.Succeeded) {
console.log(" Former next sibling XML: " + result.value);
}
});
}
}
Properties
| is |
Gets whether the node was deleted as part of an Undo/Redo action by the user. |
| old |
Gets the former next sibling of the node that was just deleted from the Office.CustomXmlPart object. |
| old |
Gets the node which was just deleted from the Office.CustomXmlPart object. Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in that you can query down from the node, but you cannot query up the tree - the node appears to exist alone. |
Property Details
isUndoRedo
Gets whether the node was deleted as part of an Undo/Redo action by the user.
isUndoRedo: boolean;
Property Value
boolean
oldNextSibling
Gets the former next sibling of the node that was just deleted from the Office.CustomXmlPart object.
oldNextSibling: CustomXmlNode;
Property Value
oldNode
Gets the node which was just deleted from the Office.CustomXmlPart object.
Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in that you can query down from the node, but you cannot query up the tree - the node appears to exist alone.
oldNode: CustomXmlNode;