本文整理匯總了TypeScript中@ephox/sugar.Selectors.is方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Selectors.is方法的具體用法?TypeScript Selectors.is怎麽用?TypeScript Selectors.is使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ephox/sugar.Selectors
的用法示例。
在下文中一共展示了Selectors.is方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
const isResizable = function (elm) {
let selector = editor.settings.object_resizing;
if (selector === false || Env.iOS) {
return false;
}
if (typeof selector !== 'string') {
selector = 'table,img,figure.image,div';
}
if (elm.getAttribute('data-mce-resize') === 'false') {
return false;
}
if (elm === editor.getBody()) {
return false;
}
return Selectors.is(SugarElement.fromDom(elm), selector);
};
示例2:
return NewLineUtils.getParentBlock(editor).filter(function (parentBlock) {
return selector.length > 0 && Selectors.is(Element.fromDom(parentBlock), selector);
}).isSome();
示例3: function
const isInlineTarget = function (editor: Editor, elm: Node): boolean {
const selector = EditorSettings.getString(editor, 'inline_boundaries_selector').getOr('a[href],code');
return Selectors.is(Element.fromDom(elm), selector);
};
示例4: function
const isInlineTarget = function (elm) {
return Selectors.is(Element.fromDom(elm), 'a[href],code');
};
示例5: function
const children = PredicateFilter.descendants(scope, function (element) {
return Selectors.is(element, selector) && predicate(element);
});