vsn 0.1.130 → 0.1.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/examples/persist.html +17 -0
- package/demo/resources/xhr-persist.html +40 -0
- package/demo/vsn.js +2 -2
- package/dist/AST/ClassNode.js +2 -0
- package/dist/AST/ClassNode.js.map +1 -1
- package/dist/AST/FunctionNode.js +8 -1
- package/dist/AST/FunctionNode.js.map +1 -1
- package/dist/Attribute.js.map +1 -1
- package/dist/DOM/AbstractDOM.d.ts +1 -0
- package/dist/DOM/AbstractDOM.js +114 -91
- package/dist/DOM/AbstractDOM.js.map +1 -1
- package/dist/Tag.d.ts +1 -0
- package/dist/Tag.js +7 -0
- package/dist/Tag.js.map +1 -1
- package/dist/attributes/PersistAttribute.d.ts +15 -0
- package/dist/attributes/PersistAttribute.js +215 -0
- package/dist/attributes/PersistAttribute.js.map +1 -0
- package/dist/attributes/_imports.d.ts +1 -0
- package/dist/attributes/_imports.js +3 -1
- package/dist/attributes/_imports.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/AST/ClassNode.ts +2 -0
- package/src/AST/FunctionNode.ts +7 -1
- package/src/Attribute.ts +0 -1
- package/src/DOM/AbstractDOM.ts +17 -3
- package/src/Tag.ts +4 -0
- package/src/attributes/PersistAttribute.ts +83 -0
- package/src/attributes/_imports.ts +1 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Persist</title>
|
|
6
|
+
|
|
7
|
+
<style></style>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript" src="../vsn.js"></script>
|
|
12
|
+
|
|
13
|
+
<div id="container" vsn-lazy="@html = << '../resources/xhr-persist.html'"></div>
|
|
14
|
+
<button vsn-on:click="#container.@html = << '../resources/xhr-persist.html'">Load Persist</button>
|
|
15
|
+
<button vsn-on:click="#container.@html = << '../resources/xhr-html.html'">Load Test</button>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
#nav-test {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
#nav-test.open {
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
#nav-test.highlight {
|
|
10
|
+
color: #0074D9;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
<div vsn-lazy="#nav-test.@class ~ 'open'">
|
|
14
|
+
<ul id="nav-test" vsn-persist="@class">
|
|
15
|
+
<li>Foo</li>
|
|
16
|
+
<li>Bar</li>
|
|
17
|
+
</ul>
|
|
18
|
+
<button vsn-on:click="#nav-test.@class ~ 'open'">Toggle</button>
|
|
19
|
+
<button vsn-on:click="#nav-test.@class ~ 'highlight'">Highlight</button>
|
|
20
|
+
|
|
21
|
+
<input id="input-test" vsn-persist="@value" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<script type="text/vsn" vsn-script>
|
|
25
|
+
class #input-test {
|
|
26
|
+
func construct() {
|
|
27
|
+
this.search();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
on input() {
|
|
31
|
+
this.search();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
func search() {
|
|
35
|
+
if (@value) {
|
|
36
|
+
log('input value', @value.trim());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|