On Thursday, October 13, 2016 at 9:20:36 PM UTC+1, Rupert Smith wrote:
> On Tuesday, October 11, 2016 at 9:09:31 PM UTC+1, OvermindDL1 wrote:
>> Remember, it is just a diffing algorithm, when it gets to that point of 
>> your vdom and it compares an old vdom node of, for example:
>> ```
>>   checkbox [ onClick (CheckToggle 42) ] [ text "Something" ]
>> ```
>> and compares it to the new of:
>> ```
>>   checkbox [ onClick (CheckToggle 43) ] [ text "Another thing" ]
>> ```
>> It sees that there are two changes (well potentially 1 due to lack of 
>> keyed event handlers, but we'll say 2 for this example), thus it accesses 
>> the checkbox at the index that it is at here (say, 14 or so) by just 
>> something like `var node = curNode.children[14];` then just applies the 
>> two changes `node.removeEventHandler("click", oldEvent); 
>> node.addEventHandler("click", newEvent); node.children[0].nodeValue = 
>> "Another thing";`, which was just removing the old event handler, adding 
>> the new, and mutating the text.
> Interesting to see this expained, thanks.

Some other questions relating to this.

I have a node that I changed an Html.Attribute.property on. The node had 2 
properties, but I only changed one. However, the node as a webcomponent 
fired triggered an observer on the other property that was not changed.

If I change just one property of a node, are all properties updated?

What about atttributes, if I change one attribute are all updated?


You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to