Skip to content

Commit

Permalink
change npm link
Browse files Browse the repository at this point in the history
  • Loading branch information
thipages committed Oct 31, 2024
1 parent 4373440 commit a8057e4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dry-html.js

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

2 changes: 1 addition & 1 deletion esm-min.js

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dry-html",
"version": "0.3.2",
"name": "@titsoft/dry-html",
"version": "0.4.0",
"description": "DRY html",
"main": "src/index.js",
"type": "module",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function defineCustomElement(templateId) {
this.style.display = 'block'
this.tRefs = structuredClone(refData)
this.append(refClone.cloneNode(true))
setData(this)
setData(this)
console.log('connected')
}
}
)
Expand Down
21 changes: 21 additions & 0 deletions test/module/append-child.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dry-html appendChild Test</title>
<script type="module" src="./../../src/auto.js"></script>
</head>
<body>
<template id="test-my">
<div>{t-title}</div>
</template>
<test-my
id="A"
t-title="my title"
></test-my>
<script>
setTimeout(() => A.replaceWith(...A.children), 1000)
</script>
</body>
</html>

0 comments on commit a8057e4

Please sign in to comment.