4 This extension is to visually test the SDK examples. To use, add this to the
7 TODO(binji): normal users shouldn't have to do this -- it should be
8 automatically loaded by the testing framework.
13 src="chrome-extension://kbbhhngcmjcmlgcnbihfgliliemmijmj/screenshot.js">
19 var myPluginEl = document.embeds[0];
20 function onSuccess(dataURL) {
21 // dataURL is a data URL encoded PNG. You can add this to a image like this:
22 var image = new Image();
23 image.onload = function() { ... }
27 function onError(errorMessage) {
31 screenshot.captureElement(myPluginEl, onSuccess, onError);
33 See screenshot.js for more info on the API.