You're creating a <canvas>
app and you're pulling images from external sources (e.g. http://notyourdomain.com/image/foo.jpg) and you want to create a bitmap of the new image via the canvas toDataUrl. You will get a DOM security error 18 most likely.
You must have control over what headers the image source sends.