本文整理匯總了TypeScript中@ephox/agar.Chain.wrap方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Chain.wrap方法的具體用法?TypeScript Chain.wrap怎麽用?TypeScript Chain.wrap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ephox/agar.Chain
的用法示例。
在下文中一共展示了Chain.wrap方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getter
return Chain.on(function (editor, next, die) {
const container = editor.iframeElement;
const getter = dimension === 'width' ? Width.get : Height.get;
const actualValue = typeof value === 'string' ? container.style[dimension] : getter(Element.fromDom(container));
Assertions.assertEq('Editors content area has expected ' + dimension, value, actualValue);
next(Chain.wrap(editor));
});
示例2: function
editor.on('SkinLoaded', function () {
next(Chain.wrap(editor));
});
示例3: setTimeout
setTimeout(function () {
next(Chain.wrap(editor));
}, 0);
示例4: next
const cCreateEditor = Chain.on((_, next, die) => next(Chain.wrap(new Editor('editor', {}, EditorManager))));
示例5: function
}).fold(die, function (win) {
next(Chain.wrap(win));
});
示例6: getDialogByElement
getDialogByElement(element).fold(die, function (win) {
Assertions.assertEq('asserting dialog contents', data, win.toJSON());
next(Chain.wrap(element));
});
示例7: function
const unbindMouseMove = DomEvent.bind(element, 'mousemove', function (e) {
Clicks.mouseup(element);
unbindMouseMove();
next(Chain.wrap(element));
}).unbind;
示例8: next
return Chain.on(function (editor, next, die) {
Assertions.assertHtml(label || 'Asserting editors content', expected, editor.getContent());
next(Chain.wrap(editor));
});