Knockout Secure Binding Syntax
VS Code syntax highlighting for Knockout Secure Binding (data-sbind ), data-bind , and params attributes.
✅ Highlights:
- Hightlights valid ko bindings witouth parent element (inline)
- Attribute names (
data-sbind , data-bind , params )
- Keys before colons
- Variables
- Numbers
- Booleans & null
- Strings
- Nested objects
{} and arrays []
Example
<div data-sbind="text: firstName, visible: isVisible,
style: { color: 'red', border: { width: 2, color: 'blue' } },
items: [ 1, 2, { label: 'X', value: true } ]">
</div>
<my-comp params="value: myValue,
config: { enabled: true, data: [ 'one', 'two', { deep: null } ] }">
</my-comp>
| |