Skip to content

Commit

Permalink
fix: Added experimental __depth increment for copied elements
Browse files Browse the repository at this point in the history
test: Removed Firefox 60, added Firefox 125, Chrome 124
  • Loading branch information
cure53 committed Apr 24, 2024
1 parent 4299c0a commit 65d35b8
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 13 deletions.
1 change: 1 addition & 0 deletions dist/purify.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.cjs.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/purify.es.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ function createDOMPurify() {
if (childNodes && parentNode) {
const childCount = childNodes.length;
for (let i = childCount - 1; i >= 0; --i) {
childNodes[i].__depth++;
parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/purify.es.mjs.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/purify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ function createDOMPurify(window = getGlobal()) {
const childCount = childNodes.length;

for (let i = childCount - 1; i >= 0; --i) {
childNodes[i].__depth++;
parentNode.insertBefore(
cloneNode(childNodes[i], true),
getNextSibling(currentNode)
Expand Down
24 changes: 16 additions & 8 deletions test/karma.custom-launchers.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ const customLaunchers = {
browser: 'edge',
os_version: '10',
},
bs_win10_firefox_60: {
base: 'BrowserStack',
device: null,
os: 'Windows',
browser_version: '60.0',
browser: 'firefox',
os_version: '10',
},
bs_win10_firefox_70: {
base: 'BrowserStack',
device: null,
Expand Down Expand Up @@ -130,6 +122,14 @@ const customLaunchers = {
browser: 'firefox',
os_version: '11',
},
bs_win10_firefox_125: {
base: 'BrowserStack',
device: null,
os: 'Windows',
browser_version: '125.0',
browser: 'firefox',
os_version: '11',
},
bs_win10_chrome_60: {
base: 'BrowserStack',
device: null,
Expand Down Expand Up @@ -186,6 +186,14 @@ const customLaunchers = {
browser: 'chrome',
os_version: '11',
},
bs_win10_chrome_124: {
base: 'BrowserStack',
device: null,
os: 'Windows',
browser_version: '124.0',
browser: 'chrome',
os_version: '11',
},
};

const getAllBrowsers = () => Object.keys(customLaunchers);
Expand Down

0 comments on commit 65d35b8

Please sign in to comment.