Tasker html5 canvas

Discussion in 'Guides / Examples / Ideas Forum' started by iloveauto, Oct 31, 2019.

  1. iloveauto

    iloveauto New Member

    Joined:
    Jul 25, 2019
    Messages:
    7
    Likes Received:
    0
    does webview support html5 canvas? i try the script but it doesnot draw. can we do anything to make it work?

    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
    Your browser does not support the canvas element.
    </canvas>

    <script type="text/javascript">
    var c=document.getElementById("myCanvas");
    var cxt=c.getContext("2d");
    cxt.fillStyle="#FF0000";
    cxt.beginPath();
    cxt.arc(70,18,15,0,Math.PI*2,true);
    cxt.closePath();
    cxt.fill();
    </script>
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    It should work I guess. Are you trying that in a scene?
     
  3. iloveauto

    iloveauto New Member

    Joined:
    Jul 25, 2019
    Messages:
    7
    Likes Received:
    0
    yes, in a scene webview.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi. I just tried it and it worked when you actually show the scene. It doesn't work in the preview though. Is that the issue for you perhaps?
     
  5. iloveauto

    iloveauto New Member

    Joined:
    Jul 25, 2019
    Messages:
    7
    Likes Received:
    0
    thanks for testing the issue. if it works for you i believe it is the issue for me.
     
: webview

Share This Page