vsn 0.1.131 → 0.1.133

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.
@@ -9,20 +9,40 @@
9
9
  <body>
10
10
 
11
11
  <script type="text/javascript" src="../vsn.js"></script>
12
+
12
13
  <script type="text/vsn" vsn-script>
13
- class .btn {
14
+ class .testing {
15
+ func construct() {
16
+ log('.testing construct');
17
+ this.a|integer = 0;
18
+ log('this.a', this.a);
19
+ }
20
+
21
+ class .test {
22
+ func construct() {
23
+ log('.test construct');
24
+ ?<(.testing).a += 1;
25
+ }
26
+ }
27
+ }
28
+
29
+ class #testing {
14
30
  func construct() {
15
- log('btn construct', this);
31
+ log('#testing construct');
32
+ this.a|integer = 0;
33
+ log('this.a', this.a);
16
34
  }
17
35
 
18
- on click() {
19
- log('btn click');
36
+ class .test {
37
+ func construct() {
38
+ log('.test construct');
39
+ ?<(.testing).a += 1;
40
+ }
20
41
  }
21
42
  }
22
43
  </script>
23
- <div id="test"></div>
24
- <div id="html-container"></div>
25
- <a href="../resources/xhr-cfs.html" vsn-xhr="#html-container.@html = response;?(#html-header).$color='yellow';" class="btn">XHR</a>
44
+ <div id="testing" class="testing"><span class="test"></span><span class="test"></span><span class="test"></span></div>
45
+ <button vsn-on:click="log(?(.testing).a)">wut</button>
26
46
 
27
47
  </body>
28
48
  </html>
@@ -25,7 +25,7 @@
25
25
  on keyup() {
26
26
  val = @value;
27
27
  if (val) {
28
- val = val.toLowerCase();
28
+ val = val.toLowerCase().trim();
29
29
  for (ele of ?(#items .item)) {
30
30
  if (ele.@itemname.indexOf(val) > -1) {
31
31
  ele.$display = 'list-item';
@@ -0,0 +1,15 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>VSN Post Replace Test</title>
6
+ </head>
7
+ <body vsn-service:xhr="XHR">
8
+
9
+ <a href="./resources/xhr-memory-leak-test.html" vsn-xhr="#test.@html = '<button>wut?</button>' + response'">Wut?</a>
10
+ <a href="./resources/xhr-memory-leak-test.html" vsn-xhr="#test.@html = '<button>huh?</button>' + response'">Huh?</a>
11
+ <div id="test"></div>
12
+
13
+ <script type="text/javascript" src="vsn.js"></script>
14
+ </body>
15
+ </html>
@@ -12,7 +12,8 @@
12
12
  class input {
13
13
  func construct() {
14
14
  log('.simple input construct');
15
- a|float = 0.0;
15
+ this.a|float = 0.0;
16
+ log(this.a);
16
17
  @value = 'wut';
17
18
  }
18
19
 
@@ -22,8 +23,8 @@
22
23
 
23
24
  on focus() {
24
25
  log(@type);
25
- a += 0.1;
26
- log(a);
26
+ this.a += 0.1;
27
+ log(this.a);
27
28
  }
28
29
 
29
30
  on mouseenter() {