vsn 0.1.65 → 0.1.68

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
@@ -67,8 +67,15 @@
67
67
  $color = "#ff00ff";
68
68
  }
69
69
 
70
+ func deconstruct() {
71
+ $color = '#000000';
72
+ }
73
+
70
74
  on click() {
71
- error('huh?');
75
+ log(@class);
76
+ @class -= 'test-class';
77
+ @class ~ 'huh';
78
+ log(@class);
72
79
  }
73
80
  }
74
81
  </script>
@@ -99,7 +106,7 @@
99
106
 
100
107
  <h2>On Click</h2>
101
108
  <div vsn-name="toggle" vsn-set:show|boolean="false">
102
- <button class="test-class" vsn-on:click="toggle.show = !toggle.show">Toggle</button>
109
+ <button class="test-class" vsn-on:click="toggle.show = !toggle.show" vsn-exec="on click() {@class -= 'test-class';log('uh', @class);}">Toggle</button>
103
110
  <span vsn-bind="toggle.show"></span>
104
111
  </div>
105
112
  <a id="click-test" vsn-on:click="if(@text != @clicktext){@text=@clicktext}else{@text='Click Me'}" clicktext="Clicked!">Click Me</a>
@@ -204,6 +211,21 @@
204
211
  vision.registry.controllers.register('MVal', MVal);
205
212
  });
206
213
  </script>
214
+
215
+ <script vsn-script type="text/vsn">
216
+ class testing-class {
217
+ on click() {
218
+ @text = 'Clicked';
219
+ }
220
+
221
+ on mouseenter() {
222
+ @text = 'Hovered!';
223
+ }
224
+ }
225
+ </script>
226
+
227
+ <button class="testing-class" test="1">Click me</button>
228
+
207
229
  <script type="text/javascript" src="vsn.js"></script>
208
230
  </body>
209
231
  </html>