Re: Clarification on what to do when zooming or resizing

On Wed, 09 Apr 2014 23:00:11 +0200, Greg Whitworth <gwhit@microsoft.com>  
wrote:

> Hey guys,
>
> I don't see anywhere that instructs what a UA should do in the event a  
> user zooms or resizes the browser (sorry if I missed it). Should the UA  
> kick of a new download for the image that matches the new dimensions, or  
> should we only do this at certain times?

"The user agent may at any time run the following algorithm to update an  
img element's image in order to react to changes in the environment. (User  
agents are not required to ever run this algorithm; for example, if the  
user is not looking at the page any more, the user agent might want to  
wait until the user has returned to the page before determining which  
image to use, in case the environment changes again in the meantime.)"

http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#the-img-element

The picture spec then monkey-patches that algorithm here  
http://picture.responsiveimages.org/#select-image-source

HTH,
-- 
Simon Pieters
Opera Software

Received on Wednesday, 9 April 2014 21:45:05 UTC