HTML (pincha para descargar)
Extracto de la transcripción automática del vídeo realizada por YouTube.
at its best is it just takes HTML and shows us to us in a nice way what I want to do is get a screenshot from a random webpage oh it's not so random but and actually render HTML in the canvas or in other words basically implementing a prolly fill which
is kind of filling a gap that has not been defined by a standards body it's not there but I still think this gap is needs filling and this is how it looks like it's basically just canvas get context droid tml that's what I want to do it looks pretty
easy does it so let's see so those very quick solution of Firefox gratefully offers an API to that basically all you do is get a canvas get the context and you draw a window to that canvas or that's basically what I want to do right there's about
two that it only works as a plug-in in Firefox so if you are plug-in you allow to you make use of that from the web page you do not you do not you do not go through that so you have to you have to be a plug-in this of course is due to security concerns so
if the browser would allow you to render a random web page you could just go just like painter the open gmail tab of your user rendered to the canvas and then read back from it and that would allow us to get content that we're not allowed to see so of
course that is forbidden and yeah that's not that's not bringing us further so let's see so maybe SVG can help us here the if you guys know canvas the canvas does allow me to draw an image well SVG is an image right so let's see whether we
can move forward to that so maybe I don't know how public that knowledge is but SVG does allow you to embed foreign objects SVG is XML it does allow anything it does allow other contexts that all can also be XML and for example it could be HTML or actually
a XHTML so the example that you can see here i hope the font is big enough it's basically just a strong element inside HTML inside a foreign object in an SVG and that is a valid image can we build on that let's see um well first of all what is X HTML
so SVG as an XML standard can only m-matt foreign objects that are valid XML wall html5 goes to great lengths of allowing you to do whatever you want and still make it look pretty that doesn't work well with SVG so here's a bit of code basically creates
a document puts in some HTML then Oh provides some XML namespace ting and then figures the the Firefox external serializer to civilize that back to back to us and that is then valid XML this does not work in chrome and safari because basically what those guys
[ ... ]
Nota: se han omitido las otras 1.695 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.