louisremi / background-size-polyfill

Adds support for background-size "cover" and "contain" to IE8
http://louisremi.github.com/background-size-polyfill/
MIT License
1.26k stars 359 forks source link

Object doesn't support property or method 'addEventListener' + 'pageUpdate' #20

Open dewdesignsthings opened 11 years ago

dewdesignsthings commented 11 years ago

Using the following code:

pagebody, #PageBody {

width: 100%; height: 100%; background: #fff url(/graphics/bg.jpg) no-repeat top center; background-size: contain; margin-top:0!important; -ms-behavior: url(/graphics/backgroundsize.min.htc); }

Get the following 2 errors in IE 8:

SCRIPT438: Object doesn't support property or method 'addEventListener' frameworks-e8054ad804a1cf9e9849130fee5a4a5487b663ed.js, line 3 character 10518 SCRIPT438: Object doesn't support property or method 'pageUpdate' github-a9c9533b5e2305f95bfe7370e447c1c68a68897b.js, line 2 character 5923

Any ideas?

jefferyto commented 11 years ago

The behavior (.htc) file has no references to 'addEventListener' nor 'pageUpdate', so I doubt it's the source of these errors.

lijuenc commented 10 years ago

In case anyone else comes across this or other "Object doesn't support property or method" errors.

If you right clicked on backgroundsize.min.htc and did a save target as, the browser saves the GitHub markup for that link. In the GitHub markup are references to files like frameworks-e8054ad804a1cf9e9849130fee5a4a5487b663ed.js which contain methods that IE8 doesn't support.

You need to grab the raw file contents of backgroundsize.min.htc.

jefferyto commented 10 years ago

Thanks @durz - that's a good reminder.