On Wed, Aug 20, 2014 at 3:23 PM, Ian Hickson <i...@hixie.ch> wrote: > On Wed, 20 Aug 2014, John Barton wrote: > > > > > > > > The reverse case, where a img depends on a script, is not a use > > > > case. > > > > > > Why not? What if the image has an onmouseover handler that calls an > > > API function defined in a module, for instance? > > > > Then the page depends on the onmouseover handler code and it has a > > dependency on the module. Images are leaf nodes in the dependency tree. > > Can you show me the markup for how you would like this to work? I'm not > sure I follow what your vision is here. >
<script> System.import('jquery').then(() => { $(document).ready(() => { $("img.a").hover(() => { $(this).stop().animate({"opacity": "0"}, "slow"); }, () => { $(this).stop().animate({"opacity": "1"}, "slow"); }); }); }); </script> Here the page depends upon a mouseover handler which depends upon jquery. The handler and the page depend upon the image. > > ... > > > > If you don't want multiple round trips, import from a "bundle". > > That doesn't work; see the discussion in this e-mail: > https://mail.mozilla.org/pipermail/es-discuss/2014-August/038853.html So I answered on another thread. jjb
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss