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

on:click style events create viewmodels on elements #540

Closed phillipskevin closed 5 years ago

phillipskevin commented 5 years ago

Events like on:click will create a viewModel when the event happens because can-view-model is being called here: https://github.com/canjs/can-stache-bindings/blob/b214428b2a4437f18b898f3255d40baa06e19056/can-stache-bindings.js#L554

This should check the Symbol instead so that extra SimpleMaps are not created as the viewmodel for normal DOM elements.