<div dir="ltr"><div dir="ltr"><div dir="ltr">@AdamChlipala<br><div><br></div><div>Actually that sounds like what was happening to me, but can't be 100% sure - I can't track the issue on github, I might have skipped a few commits while working out this issue. At the time I read somewhere what I stated above and moved on.</div><div><br></div><div>The onload of an <img> seems to work regardless of being a top level tag or being dynamically generated (and here I assume calling "new Image()" generates an <img>: that's what the chrome console seems to imply)</div><div><br></div><div>I'm giving it use in my canvas lib:</div><div><br></div><div><a href="https://github.com/fabriceleal/urweb-canvas/blob/master/demos/demos.ur#L292">https://github.com/fabriceleal/urweb-canvas/blob/master/demos/demos.ur#L292</a><br></div><div><a href="https://github.com/fabriceleal/urweb-canvas/blob/master/src/canvas.js#L46">https://github.com/fabriceleal/urweb-canvas/blob/master/src/canvas.js#L46</a><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 22, 2018 at 11:59 PM Fabrice Leal <<a href="mailto:fabrice.leal.ch@gmail.com">fabrice.leal.ch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Addendum: I never tried the onload on <img> from urweb, but on js land it works</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 22, 2018 at 11:50 PM Fabrice Leal <<a href="mailto:fabrice.leal.ch@gmail.com" target="_blank">fabrice.leal.ch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">@AdamChlipala<br><div><br></div><div>At the time I implemented an onload attribute for <div> on basis.ur and only later found out if was for no good on html/js land: the only onload that gets triggered is the one defined on <body>, setting onload for any other child tag has no "side effects"; so I scrapped that.</div><div><br></div><div>Sorry for the vagueness :) </div><div><br></div><div>I did end up using <active code={...} /> and that worked for me</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_2559976783572045076gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>---</div><div>Fabrice Leal</div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>---</div><div>Fabrice Leal</div></div></div></div>