本文整理匯總了TypeScript中tinymce/core/dom/DOMUtils.DOM.bind方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DOM.bind方法的具體用法?TypeScript DOM.bind怎麽用?TypeScript DOM.bind使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tinymce/core/dom/DOMUtils.DOM
的用法示例。
在下文中一共展示了DOM.bind方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
const bindContextualToolbarsEvents = function (editor, panel) {
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);
}
};