This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25634 - createImageBitmap() should allow incomplete <img> to be used as input (and should wait for it to load)
Summary: createImageBitmap() should allow incomplete <img> to be used as input (and sh...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 enhancement
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard: picture
Keywords:
Depends on: picture
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-09 18:47 UTC by Ian 'Hixie' Hickson
Modified: 2014-09-30 17:41 UTC (History)
2 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2014-05-09 18:47:05 UTC
This:

   var img = new Image();
   img.src = url;
   img.onload = function () {
     promise = createImageBitmap(img);
     // ...
   };

...is more complicated than necessary. Let's at least make it as simple as:

   var img = new Image();
   img.src = url;
   promise = createImageBitmap(img);
   // ...
Comment 1 Ian 'Hixie' Hickson 2014-09-30 17:41:27 UTC
It'll eventually be:

   var img = new Image();
   img.src = url;
   var promise = img.loaded.then(function () { return createImageBitmap(img); });

...which is probably good enough.