Loading ...
Sorry, an error occurred while loading the content.

Can I use IFRAME tag in canvas?

Expand Messages
  • funyaya
    I want to show web page in canvas. Can I use iframe for this?
    Message 1 of 4 , Jan 15, 2006
    • 0 Attachment
      I want to show web page in canvas. Can I use iframe for this?
    • Emil Tamas
      Mozilla docs are saying you can: Mozilla s canvas is extended with the drawWindow method.
      Message 2 of 4 , Jan 15, 2006
      • 0 Attachment
        Mozilla docs are saying you can:

        Mozilla's canvas is extended with the drawWindow method. This method draws a snapshot of the contents of a DOM window into the canvas. For example,

        ctx.drawWindow(window, 0, 0, 100, 200, "rgb(0,0,0)");

        would draw the contents of the current window, in the rectangle (0,0,100,200) in pixels relative to the top-left of the viewport, on a black background, into the canvas. By specifying "rgba(0,0,0,0)" as the color, the contents would be drawn with a transparent background (which would be slower).

        With this method, it is possible to fill a hidden IFRAME with arbitrary content (e.g., CSS-styled HTML text, or SVG) and draw it into a canvas. It will be scaled, rotated and so on according to the current transformation.


        On 1/16/06, funyaya <funyaya@...> wrote:
        I want to show web page in canvas. Can I use iframe for this?





        YAHOO! GROUPS LINKS




      • Christopher Clay
        ... However note: Currently the drawWindow function can only be used by chrome privileged content, because untrusted Web content could abuse it in various
        Message 3 of 4 , Jan 16, 2006
        • 0 Attachment
          > Mozilla's canvas is extended with the drawWindow method.

          However note:
          "Currently the drawWindow function can only be used by 'chrome
          privileged' content, because untrusted Web content could abuse it in
          various ways. So extension authors and XUL application developers can
          use it, but normal Web pages cannot."
          http://weblogs.mozillazine.org/roc/archives/2005/05/rendering_web_p.html

          This should probably be made clearer on devmo.

          Christopher
        • Carol Chen
          I know the drawWindow function, but I just expect to show a page on normal Web pages. So I am looking for one instead of drawWindow. Thanks! ... method.
          Message 4 of 4 , Jan 16, 2006
          • 0 Attachment
            I know the drawWindow function, but I just expect to
            show a page on normal Web pages.
            So I am looking for one instead of drawWindow.
            Thanks!

            ---------------------------------
            > Mozilla's canvas is extended with the drawWindow
            method.

            However note:
            "Currently the drawWindow function can only be used by
            'chrome
            privileged' content, because untrusted Web content
            could abuse it in
            various ways. So extension authors and XUL application
            developers can
            use it, but normal Web pages cannot."
            http://weblogs.mozillazine.org/roc/archives/2005/05/rendering_web_p.html

            This should probably be made clearer on devmo.

            Christopher





            SPONSORED LINKS
            Flash
            design Design
            technology Design


            ---------------------------------
            YAHOO! GROUPS LINKS


            Visit your group "canvas-developers" on the web.

            To unsubscribe from this group, send an email to:
            canvas-developers-unsubscribe@yahoogroups.com

            Your use of Yahoo! Groups is subject to the Yahoo!
            Terms of Service.


            ---------------------------------









            ___________________________________________________________
            雅虎1G免费邮箱百分百防垃圾信
            http://cn.mail.yahoo.com/
          Your message has been successfully submitted and would be delivered to recipients shortly.