You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a key:from="value" binding exists and value is an object, I think it should set the key property on the element.
For example, I think record should be available on the <div>:
import{stache}from"//unpkg.com/can@5/core.mjs";constview=stache(` <div id="theDiv" record:from="this.record"> This is a div </div>`);constfragment=view({record: {name: "I am some data"}});document.body.appendChild(fragment);vartheDiv=document.getElementById("theDiv");console.log(theDiv.record)
If a
key:from="value"
binding exists andvalue
is an object, I think it should set thekey
property on the element.For example, I think
record
should be available on the<div>
:https://codepen.io/justinbmeyer/pen/MzyXjG?editors=0011
I think this will help with custom elements. We can pass values directly to them.
This can deprecate
domData
. Also, it currently sets therecord
attribute to"[object Object]"
, so I don't think this will be a breaking change.The text was updated successfully, but these errors were encountered: