W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2011

[whatwg] HTML 5 toDataUrl() method expansion

From: Brian Ernesto <bernesto@neoreef.com>
Date: Thu, 6 Oct 2011 22:34:09 +0000
Message-ID: <50E708300442634FB4F4FEF74F444D6935AC1750@NEOREEFSRV20.neoreef.com>
Hello all,

We just came up with an idea that we think would be a worthy addition to the HTML 5 spec. Being new to the contribution process I hope this is the appropriate venue to vet this idea. 

We have been using a script called html2canvas that utilizes the CANVAS tag to render screen captures of HTML blocks via the toDataURL() method. It does this by recreating and drawing each element to a CANVAS tag, but it can be very slow on large pages.

It occurred to us today that it would really be useful to have every element in the DOM have the method toDataURL() (e.g. document.getElementById('myDiv').toDataURL() ). This would be a powerful way of capturing image data of any element from the whole HTML level down to a lone DIV. This would allow use in things such as animations, graphical annotations, and various UI effects. 

I welcome your thoughts.

Brian Ernesto
bernesto at neoreef.com
Toll Free: 1-888-NEOREEF :: Phone: (208) 629-2921 :: Fax: (208) 629-2922 :: (208) 283-0784
The Neoreef vision is to empower your online business to be full of life and have its own "ecosystem" which helps it replenish, grow and make every visit a unique and personal experience.
Received on Thursday, 6 October 2011 15:34:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC