从事件中删除订阅者。
注释
此 API 可用于小组件和统一接口页面。
Syntax
Microsoft.CIFramework.removeHandler(eventName, handlerFunction);
参数
| Name | 类型 | 必选 | Description |
|---|---|---|---|
| 事件名称 | 字符串 | 是的 | 为其设置处理程序的事件的名称。 支持的事件如下:
|
| handler函数 | 功能 | 是的 | 要删除的处理程序函数。 |
Example
Microsoft.CIFramework.removeHandler(eventName, handlerFunction).then(
function (result) {
// result will indicate if the passed in handler function has been removed
console.log(result)
},
function (error) {
// code handling for promise failure
console.error(error)
}
);