Description
According to Surplus documentation, all attributes of an element are updated as part of a single generated S computation.
That's probably usually ok, and I understand from #23 (comment) the general reason for this behavior is to guarantee precedence of attributes.
However, with an iframe it seems like every time the 'src' attribute is touched (at least in Chrome), the iframe is reloaded. So even if you set a different attribute of the iframe, the iframe is always reloaded.
Demo: https://jsfiddle.net/u825n1vw/18/
It seems like a minimum viable workaround would be to have special code emitted when updating an iframe src attribute, such as:
if (iframe.src !== signal()) {
iframe.src = signal();
}
I wonder what other side effects exist that this 'single computation' granularity would trigger. I think I'd rather give up the precedence guarantee for finer granularity.
Activity