本文整理汇总了TypeScript中tinymce/core/api/dom/DOMUtils.DOM.bind方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DOM.bind方法的具体用法?TypeScript DOM.bind怎么用?TypeScript DOM.bind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tinymce/core/api/dom/DOMUtils.DOM
的用法示例。
在下文中一共展示了DOM.bind方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
const bindContextualToolbarsEvents = function (editor: Editor, panel: InlitePanel) {
const throttledTogglePanel = Delay.throttle(togglePanel(editor, panel), 0);
const throttledTogglePanelWhenNotInForm = Delay.throttle(ignoreWhenFormIsVisible(editor, panel, togglePanel(editor, panel)), 0);
const reposition = repositionPanel(editor, panel);
editor.on('blur hide ObjectResizeStart', panel.hide);
editor.on('click', throttledTogglePanel);
editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm);
editor.on('ResizeEditor keyup', throttledTogglePanel);
editor.on('ResizeWindow', reposition);
DOMUtils.DOM.bind(Env.container, 'scroll', reposition);
editor.on('remove', function () {
DOMUtils.DOM.unbind(Env.container, 'scroll', reposition);
panel.remove();
});
editor.shortcuts.add('Alt+F10,F10', '', panel.focus);
};
示例2: toggleClass
},
toggleClass (elm, cls, state) {
return DOMUtils.DOM.toggleClass(elm, cls, state);
},
css (elm, name, value?) {
return DOMUtils.DOM.setStyle(elm, name, value);
},
getRuntimeStyle (elm, name) {
return DOMUtils.DOM.getStyle(elm, name, true);
},
on (target, name, callback, scope?) {
return DOMUtils.DOM.bind(target, name, callback, scope);
},
off (target, name, callback) {
return DOMUtils.DOM.unbind(target, name, callback);
},
fire (target, name, args) {
return DOMUtils.DOM.fire(target, name, args);
},
innerHtml (elm, html) {
// Workaround for <div> in <p> bug on IE 8 #6178
DOMUtils.DOM.setHTML(elm, html);
}
};