Skip to content

Commit

Permalink
fixes after cr
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Nov 23, 2022
1 parent a329538 commit 6430d85
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
(function (global, doc, ibexa) {
const resizeEllipsisObserver = new ResizeObserver((entries) => {
entries.forEach((entry) => {
parseAll(entry.target);
parse(entry.target);
});
});
const parse = (baseElement = doc) => {
if (!baseElement) {
console.warn('No baseElement provided');
const isHTMLElement = baseElement instanceof Element || baseElement instanceof Document;

if (!isHTMLElement) {
console.warn('Provided element does not belong to Document interface');

return;
}
Expand Down Expand Up @@ -36,10 +38,11 @@
contentElements.forEach((contentElement) => {
contentElement.innerHTML = contentEscaped;
});
parseAll(baseElement);
parse(baseElement);
};

ibexa.addConfig('helpers.ellipsis.middle', {
parse,
parseAll,
update,
});
Expand Down

0 comments on commit 6430d85

Please sign in to comment.