vsn 0.1.11 → 0.1.15

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
@@ -76,10 +76,10 @@
76
76
 
77
77
  <template vsn-template id="query-operator-example-item">
78
78
  <li vsn-list-item>
79
- <span vsn-if="'active' in ?:parent.@class">active</span>
80
- <span vsn-if:not="'active' not in ?:parent.@class">inactive</span>
81
- <button vsn-on:click="?:parent.@class += 'active'">+</button>
82
- <button vsn-on:click="?:parent.@class -= 'active'">-</button>
79
+ <span vsn-if="'active' in ?(:parent).@class">active</span>
80
+ <span vsn-if:not="'active' not in ?(:parent).@class">inactive</span>
81
+ <button vsn-on:click="?(:parent).@class += 'active'">+</button>
82
+ <button vsn-on:click="?(:parent).@class -= 'active'">-</button>
83
83
  </li>
84
84
  </template>
85
85
 
@@ -97,18 +97,26 @@
97
97
  <button vsn-on:click="show = !show" vsn-set:show="false|boolean">Toggle</button>
98
98
  <span vsn-bind="show"></span>
99
99
 
100
+ <button vsn-on:click="@text='Clicked'" id="ttt">Click Me</button>
101
+
100
102
  <h2>? Operator</h2>
101
103
  <p>Add/remove class to list of elements on click.</p>
102
104
  <p>
103
- <button vsn-on:click="?#list-add-remove-class-example li.@class += 'active'">Add</button> <button vsn-on:click="?#list-add-remove-class-example li.@class -= 'active'">Remove</button> <button vsn-on:click="?#list-add-remove-class-example li.@class ~ 'active'">Toggle</button>
105
+ <button vsn-on:click="?(#list-add-remove-class-example li).@class += 'active'">Add</button> <button vsn-on:click="?(#list-add-remove-class-example li).@class -= 'active'">Remove</button> <button vsn-on:click="?(#list-add-remove-class-example li).@class ~ 'active'">Toggle</button>
104
106
  <ul id="list-add-remove-class-example" vsn-list initial-items="5" template="#query-operator-example-item"></ul>
105
107
  </p>
106
108
 
109
+ <h2>@ Operator</h2>
110
+ <p></p>
111
+ <p>
112
+ <input type="text" value="testing" id="at-attribute" /> <input type="button" vsn-on:click="?(#at-attribute).@type = 'password'" value="Button" /> <input type="button" vsn-on:click="?(#at-attribute).@type = 'text'" value="Button" />
113
+ </p>
114
+
107
115
  <p>Bind to window attributes. </p>
108
- <p>window.scrollX,Y <span vsn-bind="?window.@scrollX"></span>, <span vsn-bind="?window.@scrollY"></span></p>
116
+ <p>window.scrollX,Y <span vsn-bind="?(window).@scrollX"></span>, <span vsn-bind="?(window).@scrollY"></span></p>
109
117
 
110
118
  <h2>Attribute Binding</h2>
111
- <a href="/index.html" id="link">Home</a>
119
+ <a href="/index.html" id="link" vsn-name="link_test">Home</a>
112
120
  <input type="text" vsn-bind="#link.@text"/>
113
121
  <input type="text" vsn-bind="#link.@href"/>
114
122