canjs / can-stache-bindings

Binding helpers for CanJS template engines
https://canjs.com/doc/can-stache-bindings.html
MIT License
8 stars 8 forks source link

preventing events like on:click from creating viewmodels on normal elements #541

Closed phillipskevin closed 5 years ago

phillipskevin commented 5 years ago

This checks the can.viewModel symbol instead of using can-view-model so that ViewModels are not created on normal DOM elements when events happen. This also caches the Symbol everywhere it's used.

closes https://github.com/canjs/can-stache-bindings/issues/540.