-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
diary - slice, value, select relations #45
Comments
Slice related attributes
Attributes passed to Event object filedsIn datadom in slice-value xPathIn order to access data from whole dataset the XML have to be same as in The properties of slice-ed element is primary subject of data access, hence have to be presented in
? Should the event target properties be exposed or attributes are sufficient? |
related: #42 |
Does the removable of the slice=s element trigger the slice-update event? |
@jasvir , that has to be defined in the scope of this issue. <input slice="s" > IMO is equals to
<input slice="s" slice-event="change init" slice-value="/datadom/slice/s"> The reason of init disabling:
<button value="abc" slice="s" slice-event="click" > populates the slice with value when clicked but not on initialization.
I guess you meant would remove or adding the element with <if test="some condition"
<input value="when included by condition ^^, this is assigned to slice" slice="s" type="hidden">
</if> The answer is yes. But removing of element would not trigger the slice change. |
@jasvir , are there concerns on naming convention for slice attributes ? |
I'm a little confused by when you have hyphens and when not - that seems inconsistent. slot-event vs slotvalue. It's not a big deal but I would avoid hyphens if possible. if they were ever in the future to be reflected to javascript, the properties would need to be turned into camel case (so slot-event would be slotEvent). |
@jasvir , you right. It has to be consistent. And during conversation I have misused So Now to the match of attributes to elements.
<input slice="xxx" slice-event="keyup" /> But sometimes we would need to populate into different slices with own values. For that own tag has to be used for each slice to avoid confusion. <textarea>
<slice name="a" slice-event="keyup" slice-value="'typed '+$value" ></slice>
<slice name="b" slice-event="keyup" slice-value="char_count($value)" ></slice> In scenario ^^ the same event to populate different values into different slices. I.e. a="typed GFDFAHGF", b=22. More in #42 |
One more thought but I'm not sure this is the right issue for me to add it to... DOM elements have a convention of making executable code in attributes ie event handlers have the convention of starting with on...so onload, onmousedown etc (heh except online). This makes the life of sanitizers easier. I don't fully understand the semantics of slice-value but if you have expressions in there, it's worth thinking through if you want a convention between dead data attributes and active code. |
@jasvir , the XSLT and The
Regarding the “active” component, it’s not just the attributes that are active, but the entire template is considered active markup. A |
Status update. Implemented in |
There is a need to alling
value
slot
expression for location in datadomIdeas to think about
<input slice="s">
<input slice="s" value="A">
<input slice="s" value="A" slice-event="tap"/>
<input slice="s" value="{$a}" slice-event="tap" />
a
<input slice="s" value="B" slice-value="'x'+@value" />
value
<input slice="s" slice-value="'x:'+@pageX" slice-event="mousemove" />
Aspects
Things to think over:
value
gives just inital value,value
is changed by element in runtime.value
is overriddidden by template. Hencevalue
can not be used to keep the state/changes.slice
is to definevalue
is missing, the data selector to set initialvalue
The text was updated successfully, but these errors were encountered: