vsn 0.1.83 → 0.1.86

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
@@ -85,38 +85,24 @@
85
85
  <template vsn-component:test-component>
86
86
  <script vsn-script type="text/vsn">
87
87
  class test-component {
88
- func construct() {
89
- log(?>(.test-class button));
90
- $color = "#ff00ff";
91
- }
92
-
93
- class .test-class {
94
- func construct() {
95
- log('huh');
96
- $color = "#ff00ff";
97
- }
98
-
99
- class button {
100
- func construct() {
101
-
102
- }
103
-
104
- on click() {
105
- @class ~ 'huh';
106
- }
88
+ class .test-class {
89
+ func construct() {
90
+ log('hmm?');
91
+ $color = "#ff00ff";
92
+ }
93
+ class button {
94
+ func construct() {
95
+ $color = "#ff00ff";
107
96
  }
108
- }
109
97
 
110
- class .huh {
111
- func construct() {
112
- log('construct');
113
- $color = "#ff00ff";
114
- }
115
- func deconstruct() {
116
- log('deconstruct');
117
- $color = "#ffff00";
98
+ on click() {
99
+ log(@class);
100
+ @class -= 'test-class';
101
+ @class ~ 'huh';
102
+ log(@class);
103
+ }
118
104
  }
119
- }
105
+ }
120
106
  }
121
107
  </script>
122
108
  <div class="test-class">
@@ -127,8 +113,7 @@
127
113
  </div>
128
114
  </template>
129
115
 
130
- <test-component vsn-name="asd"></test-component>
131
- <test-component vsn-name="dsf"></test-component>
116
+ <test-component></test-component>
132
117
 
133
118
  <template vsn-template id="vsn-template">
134
119
  <span>Hello, world!</span>
@@ -255,7 +240,7 @@
255
240
  <script type="text/javascript">
256
241
  window.addEventListener('vsn', function () {
257
242
  vision.registry.controllers.register('TestController', TestController);
258
- vision.registry.controllers.register('TestItem', TestItem);
243
+ vision.registry.models.register('TestItem', TestItem);
259
244
  vision.registry.controllers.register('Controller', Controller);
260
245
  vision.registry.controllers.register('MVal', MVal);
261
246
  });