Binary behaviors are no longer bound automatically

To provide greater consistency with other popular browsers, Internet Explorer does not automatically bind binary element behaviors. (Earlier versions of the browser automatically bound binary element behaviors.)

Automatic binding of binary behaviors works in Windows Internet Explorer 8 but it does not work as expected in Windows Internet Explorer 9. A user would see a generic element instead of the specific control.

Binding controls must be manually instantiated when creating webpages for Internet Explorer 8.

You must manually instantiate the binding control when you create webpages for Internet Explorer 8, as the following code example shows.


<html xmlns:svg>
 <head>
  <title>SVG embedded inline in XHTML</title>
  <!-- The following is the "hookup code"  that Internet Explorer requires. –->
  <object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2">
  </object>
  <?import namespace="svg" implementation="#AdobeSVG"?>
 </head>
 <body>
  <svg:svg width="600" height="300">
   <svg:linearGradient id="gradient">
    <svg:stop style="stop-color:yellow" offset="0%" />
    <svg:stop style="stop-color:green" offset="100%" />
   </svg:linearGradient>
   <svg:rect x="0" y="0" width="100" height="100" style="fill:url(#gradient)" />
   <svg:circle cx="50" cy="50" r="30" style="fill:url(#gradient)" />
   <svg:circle cx="150" cy="100" r="50" />
  </svg:svg>
 </body>
</html>

The following code example uses the native Scalable Vector Graphics (SVG) handling in Internet Explorer 9


<html>
 <head>
  <title>SVG embedded inline in XHTML</title>
 </head>
 <body>
  <svg width="600" height="300" xmlns="http://www.w3.org/2000/svg">
   <linearGradient id="gradient">
    <stop style="stop-color:yellow" offset="0%" />
    <stop style="stop-color:green" offset="100%" />
   </linearGradient>
   <rect x="0" y="0" width="100" height="100" style="fill:url(#gradient)" />
   <circle cx="50" cy="50" r="30" style="fill:url(#gradient)" />
   <circle cx="150" cy="100" r="50" />
  </svg>
 </body>
</html>

Related topics

Internet Explorer Namespace Support
-ms-behavior Attribute | behavior Property
Binary Behaviors
Discovering Internet Explorer Developer Tools
Specifying Document Compatibility Modes

 

 

Show:
© 2014 Microsoft