Office.RemoveHandlerOptions interface
提供用于确定删除哪些事件处理程序的选项。
注解
使用方
- Office.Binding: removeHandlerAsync
- Office.CustomXmlPart: removeHandlerAsync
- Office.Document: removeHandlerAsync
- Office.Settings: removeHandlerAsync
示例
function onBindingDataChanged(eventArgs) {
// Handle binding changes.
}
function removeEventHandlerFromBinding() {
const options: Office.RemoveHandlerOptions = {
handler: onBindingDataChanged
};
Office.select("bindings#MyBinding").removeHandlerAsync(
Office.EventType.BindingDataChanged,
options
);
}
属性
| async |
在传递给回调的 AsyncResult 对象的 asyncContext 属性中返回的、未更改的任何类型的用户定义的项。 |
| handler | 要删除的处理程序。 如果未指定特定处理程序,则删除指定事件类型的所有处理程序。 |
属性详细信息
asyncContext
在传递给回调的 AsyncResult 对象的 asyncContext 属性中返回的、未更改的任何类型的用户定义的项。
asyncContext?: any
属性值
any
handler
要删除的处理程序。 如果未指定特定处理程序,则删除指定事件类型的所有处理程序。
handler?: (eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any
属性值
(eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any