本文整理汇总了TypeScript中tinymce/core/focus/FocusController.isEditorUIElement函数的典型用法代码示例。如果您正苦于以下问题:TypeScript isEditorUIElement函数的具体用法?TypeScript isEditorUIElement怎么用?TypeScript isEditorUIElement使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isEditorUIElement函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
suite.test('isEditorUIElement when api predicate is overwritten', function () {
const customUiElm = DOMUtils.DOM.create('div', { class: 'abc' }, null);
const customNoUiElm = DOMUtils.DOM.create('div', { class: 'x' }, null);
const oldPredicate = FocusManager.isEditorUIElement;
FocusManager.isEditorUIElement = function (elm) {
return elm.className === 'abc';
};
LegacyUnit.equal(FocusController.isEditorUIElement(customUiElm), true, 'Should be true it is a valid ui element now');
LegacyUnit.equal(FocusController.isEditorUIElement(customNoUiElm), false, 'Should be false since it not matching predicate');
FocusManager.isEditorUIElement = oldPredicate;
LegacyUnit.equal(FocusController.isEditorUIElement(customUiElm), false, 'Should be false since the predicate is restored');
});