Could you help me to add a fix the IE9.js way ?

Showing 1-1 of 1 messages
Could you help me to add a fix the IE9.js way ? Max 4/15/12 6:37 AM

I like IE9.js very much, and would like to use one of its functions to
write my own fix, using IE7.CSS.addFix. (I think)

I would like to do this fix:

For every element that has a CSS rule "background: linear-
gradient( *** )" applied, I'd like to add this fix for IE < 10: "-pie-
background: linear-gradient( *** ) .

That -pie- rule will be read by CSS3Pie, which enables (amongst other
things) linear-gradients on IE < 10.

So I tried to add this in a test page (it's just the first step of the
definitive fix):

    <!--[if lt IE 9]><script src="IE9.js">var IE7_PNG_SUFFIX=".png";</

      IE7.CSS.addFix(/\bbackground\s*:\s*/, function(match, value) {
        alert(match + ' ' + value);
        //return "-pie-background:" + value;

      div { width: 50px; height: 50px; padding: 50px; border: 1px
solid black; background:linear-gradient(#000, #fff); }


When I visit that page on IE, I get many alerts saying "background:
undefined", and it's normal -I guess- because my regexp isn't

if I add linear-gradient inside my regexp ( /\bbackground\s*:\s*linear-
gradient/ ) and refresh, there's no alert anymore.

IE7.js parses the CSS files and <style> elements, doesn't it?
So why is it unable to see that rule?
Do you think it's possible to achieve what i'm trying to do? Can you
help me?