Having VML working in IE8 standard mode

2,242 views
Skip to first unread message

lrbabe

unread,
Nov 29, 2008, 6:19:54 PM11/29/08
to google-excanvas
it seems that Microsoft finally gave the solution to use VML in IE8:
https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=333905
See how guys at dojo implemented it: http://trac.dojotoolkit.org/ticket/7658

if(!document.documentMode || document.documentMode<8) {
document.createStyleSheet().addRule('v\\:*', "behavior: url
(#default#VML);");
}

if(document.documentMode && document.documentMode>=8) {
document.writeln('<?import namespace="v"
implementation="#default#VML" ?>');
}

lrbabe

unread,
Nov 29, 2008, 6:32:13 PM11/29/08
to google-excanvas
And there seems to be another solution working across all versions of
IE:

document.namespaces.add("v","urn:schemas-microsoft-
com:vml","#default#VML");

I haven't tested it yet.

Erik Arvidsson

unread,
Nov 29, 2008, 7:26:39 PM11/29/08
to google-excanvas
2008/11/29 lrbabe <lrb...@gmail.com>:

>
> And there seems to be another solution working across all versions of
> IE:
>
> document.namespaces.add("v","urn:schemas-microsoft-
> com:vml","#default#VML");

This is the solution we have always used in ExCanvas.


--
erik

lrbabe

unread,
Nov 30, 2008, 6:42:21 AM11/30/08
to google-excanvas
No it's not. Currently we use:
if (!doc.namespaces['g_vml_']) {
doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml');
}

without "#default#VML" as a third argument.

Erik Arvidsson

unread,
Nov 30, 2008, 7:02:40 PM11/30/08
to google-...@googlegroups.com
I see.

However, this code does not work on IE8b2. Maybe it will work on IE8rc1?
--
erik

lrbabe

unread,
Nov 30, 2008, 8:38:27 PM11/30/08
to google-excanvas
It's our last hope to get dynamic vml insertion working in IE8.
If it not, it only means that Microsoft is forcing us to use
Silverlight. Am I right ?

Erik Arvidsson

unread,
Dec 8, 2008, 2:58:35 AM12/8/08
to google-...@googlegroups.com
I just update excanvas.js to work in IE8 betas. Please get revision
43 and tell me how it works for you.

--
erik
--
erik

Fabien

unread,
Dec 8, 2008, 12:39:36 PM12/8/08
to google-excanvas
Hi ! it works fine for me on IE8 Beta 2 (tested with the latest Flotr
revision)
It works using all the available modes of the beta.

Thank you very much for this upgrade :)
Reply all
Reply to author
Forward
0 new messages