Here is the HTC content I'm encoding (nothing fancy):
<public:component> <script type="text/javascript"> alert('data URI'); </script> </public:component>
Here is the definition in the CSS file, with the above component base64'd:
.something { -ms-behavior: url(data:text/x-component;base64,PHB1YmxpYzpjb21wb25lbnQ+PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPmFsZXJ0KCdiYXNlNjQnKTs8L3NjcmlwdD48L3B1YmxpYzpjb21wb25lbnQ+); }
Doesn't seem to work...although when I save the above component to a file, and reference it in the behavior
property, I get my alert. I remember an announcement that behaviors could now be housed in data URIs in IE8...I thought that was the trade off for taking dynamic properties (CSS expressions) away from us. Is this wrong?