Getting a reference to an IHTMLCanvasElement

How can I get a DOM link to a canvas handle. I use Delphi, IE11 and the corresponding library like MSMHTML, I suspected it line by line

canvasHandle := (HTMLDoc3.getElementById('canvas') as IHTMLCanvasElement);

Html:

<canvas id="canvas">
  ....
</canvas>

however, this raises an exception "Interface not supported"

+4
source share
1 answer

TWebBrowser, by default uses IE7 standards / rendering mode.
You must tell management to use the latest standards. There are several ways to do this.

Here are two of the ways I know:

  • Or you specify FEATURE_<some feature>for your application in the registry (.eg is FEATURE_BROWSER_EMULATIONalso a good article here ).

  • "meta http-equiv-'X-UA-Compatible' content= edge" <head> -, Windows IE .
    HTML5 .

+3

All Articles