vsn 0.1.122 → 0.1.123

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/demo.html CHANGED
@@ -204,7 +204,7 @@
204
204
  </div>
205
205
 
206
206
  <h2>Lazy XHR Component</h2>
207
- <div vsn-lazy="@html = << './xhr.html'"></div>
207
+ <div vsn-lazy="@html = << './resources/xhr-lazy.html'"></div>
208
208
 
209
209
  <script type="text/javascript">
210
210
  window.addEventListener('vsn', function () {
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Events</title>
6
+
7
+ <style></style>
8
+ </head>
9
+ <body>
10
+
11
+ <div id="container">
12
+ <div class="test-container">
13
+ <div class="test"></div>
14
+ </div>
15
+ <button vsn-on:click="with ?(.test) {log('wut');wait(1);@html += 'Hello World!';}">Click Me</button>
16
+ </div>
17
+ <script type="text/javascript" src="../vsn.js"></script>
18
+ </body>
19
+ </html>
@@ -0,0 +1 @@
1
+ <h1 id="html-header">Testing</h1>
@@ -13,6 +13,7 @@
13
13
  func construct() {
14
14
  log('.simple input construct');
15
15
  a|float = 0.0;
16
+ @value = 'wut';
16
17
  }
17
18
 
18
19
  func deconstruct() {
@@ -24,10 +25,26 @@
24
25
  a += 0.1;
25
26
  log(a);
26
27
  }
28
+
29
+ on mouseenter() {
30
+ with ?>(:parent label) {
31
+ @originaltext = @text;
32
+ @text = 'hovered';
33
+ }
34
+ }
35
+
36
+ on mouseleave() {
37
+ with ?>(:parent label) {
38
+ @text = @originaltext;
39
+ }
40
+ }
27
41
  }
28
42
  }
29
43
  </script>
30
- <div class="simple"><input type="text" /></div>
44
+ <div class="simple">
45
+ <label>Simple Input</label>
46
+ <input type="text" />
47
+ </div>
31
48
  <div class="simple"><input type="button" /></div>
32
49
  <button vsn-on:click="?(.simple)[0].@class -= 'simple'">Remove</button>
33
50
  </div>