mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
Replace the deprecated isSameNode method in DOM Level 4 with the === operator (#15347)
This commit is contained in:
parent
a730a575d5
commit
c88f99646c
51 changed files with 160 additions and 160 deletions
|
|
@ -114,7 +114,7 @@ export const openSnippets = () => {
|
|||
dialog.element.setAttribute("data-key", Constants.DIALOG_SNIPPETS);
|
||||
dialog.element.addEventListener("click", (event) => {
|
||||
let target = event.target as HTMLElement;
|
||||
while (target && !target.isSameNode(dialog.element)) {
|
||||
while (target && (target !== dialog.element)) {
|
||||
if (target.id === "addCodeSnippetCSS" || target.id === "addCodeSnippetJS") {
|
||||
target.parentElement.insertAdjacentHTML("afterend", genSnippet({
|
||||
type: target.id === "addCodeSnippetCSS" ? "css" : "js",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue