Skip to content

Commit

Permalink
fix: compatibility with iOS < 14
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed May 27, 2022
1 parent dd833ef commit fd13c35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## WIP

### Fixed

- Fix compatibility with iOS < 14

## 3.14.2 (May 27, 2022)

### Fixed
Expand Down
7 changes: 4 additions & 3 deletions src/js/util/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ export function isTag(element, tagName) {
}

export function empty(element) {
return replaceChildren(element, '');
element = $(element);
element.innerHTML = '';
return element;
}

export function html(parent, html) {
return isUndefined(html) ? $(parent).innerHTML : replaceChildren(parent, html);
return isUndefined(html) ? $(parent).innerHTML : append(empty(parent), html);
}

export const replaceChildren = applyFn('replaceChildren');
export const prepend = applyFn('prepend');
export const append = applyFn('append');
export const before = applyFn('before');
Expand Down

0 comments on commit fd13c35

Please sign in to comment.