"JJ" <***@vfemail.net> wrote
| In the past weeks, I wanted to programmatically create and draw images
| scratch using HTA. I thought about using the HTML5's Canvas element
| I already have MSIE11 in my Windows 7 system, but turns out that it
| recognize the <canvas> HTML tag.....
Thanks for all that. I've seen that compatible tag
in webpages but didn't know what it meant. It seems
odd outside of HTA. I use quirks mode by just not
adding a DOCTYPE tag. That serves for all browsers.
With IE11 it renders in Edge mode unless otherwise
specified on clientside by adding that domain as an
exemption. (The exemption then changes the userAgent
In other words, you can spec quirks mode for IE 6-10,
but it won't work in IE11. IE11 breaks compatibility
with IE-specific functionality and the webpage author
gets no say in the matter. So I don't know why anyone
would specify IE11 compatibility in a webpage. It's
interesting that it changes HTA behavior.
As far as I know, IE in an HTA will generally render
as that version. In other words, if you write an HTA with
IE10 you should get IE10 behavior, as long as you add
a suitable doctype tag. I suspect you're seeing the
difference with IE11 because of its unusual Edge pairing.
For my own purposes I always use quirks mode, in HTAs
or webpages. (No doctype tag.) I've never been curious
about SVG drawing
and don't see anything especially relevant in HTML5. And
using quirks mode means I know that anyone, with any IE
version, can load the page and see the same thing with the
same layout. If you don't use quirks mode you need to test
in each IE version. Which is why so many websites use code
<!--[if lt IE 8]>
<!--[if lt IE 9]>
<!--[if lte IE 10]>
Then they'll specify different CSS specifically for each
IE version. So if your HTA is only used by you then it's fine,
but if you distribute it then you shouldn't make it dependent
on something like canvas.
| Although there's no HTML5 in IE8, IE8 has a view more HTML, CSS, and
| little more capabilities for HTAs.
I doubt it. The changes between IE versions are mostly
layout. In one version a table might render 2 pixels higher
than in another version. Stuff like that. I've never encountered
not being able to do what I need to in an HTA. The DOM
is incredibly rich and complex.
I do remember once
writing an HTA in IE5 that had a panel with horiz scrolling
for a number of vertical items. A database view. In IE6 it
went wacky, extending off the page rather than staying in
the panel and scrolling. I had to play with it until I found an
HTML option that worked in both versions. Similarly, older
IE can't treat a DIV as a block object. You have to use a
table. But adding that capability doesn't make a newer
version better. It just makes the two incompatible. If you
want your webpage to always look right then you need to
either use quirks mode or target each IE version separately.
Remember that argument we had about Edge awhile back?
That's the reason I block Edge/IE11. They won't accept
quirks mode. So neither my page for non-IE nor my page for
IE5-10 can be served up. I use PHP to put the page together
during load, depending on whether it's IE or not. Since IE11
default and Edge can't show the IE page properly, not
recognizing quirks mode, I made it 3 options: IE page,
non-IE page, or "woops, sorry" page. The sorry page explains
that IE11 can be adjusted but that Edge just won't work.
Fortunately, The new Edge will have a userAgent "Edg"
and will have a chromium engine. I can just let that UA
go to the non-IE page. And hopefully IE11/Edge will be
phased out as the semi-well-intentioned monstrosities that
they are, leaving Trident to be pretty much used only for
HTAs and help files.