The owner of root needs to process src="{{iconSrc}}" as a custom property binding. To do that, the delegate must have four pieces of information: the target node (g-icon), the target attribute ('src'), the model (model), and the content string ('iconSrc').
Currently the delegate currently only receives model, and 'iconSrc' as inputs.
bindOrDelegate has the other values available, so I monkey-patched them in as arguments to delegate, and it worked a treat. I.e.
Under v2, Toolkit binds a shadow-root to a model like so:
Now, imagine a shadow root like this:
The owner of root needs to process
src="{{iconSrc}}"
as a custom property binding. To do that, the delegate must have four pieces of information: the target node (g-icon
), the target attribute ('src'
), the model (model
), and the content string ('iconSrc'
).Currently the delegate currently only receives
model
, and'iconSrc'
as inputs.bindOrDelegate
has the other values available, so I monkey-patched them in as arguments to delegate, and it worked a treat. I.e.Btw, overall, the new system is a big advance as it let's us remove a ton of code.