richpixel

Problems with Pixi on IE9

Recommended Posts

Well I know getting things to work on older versions of IE are not the highest priority... however- I chose pixi for some client work and of course they are having problems seeing it on IE9/Windows 7

 

I believe the problem is due to pixi using Object.defineProperty() which IE9 should be able to handle... but doesn't always.

 

There's a lot out there about getting the browser into IE9 standards mode (or something) - but every combination of tags and doctypes I use only seem to fix the problem, only to have it broken the next time we open the browser.

 

Using F12 developer tools to change the browser mode can fix it, but of course the end user won't be expected to do that.

 

The start of my html looks like this:

 

<!DOCTYPE html>
<html>
<head>
    <title>My Project</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta charset="utf-8">
 

Tried removing the IE=Edge meta tag but it gives me 'random' success. I'm basically ready to give up and convert to EaselJS which won't take me too long, but I'm still curious about this.

 

Thanks for any clues!

 

Share this post


Link to post
Share on other sites

I don't use the IE=Edge thing and I have no issue with IE9...

But still, I patched modified Pixi to not use Object.defineProperty so it might be the reason ^^ I never tried it with it before that, but as xerver said, you can try to use a polyfill if you're sure that's the reason of your problems.

Share this post


Link to post
Share on other sites

Object.defineProperty works fine in IE9, I'd wager the issue is with your doctype forcing it to fall into an unsupported mode. If you are telling it to use IE=Edge then you're basically saying only support the latest version of IE. IE9 will see this and fall into Quirks mode. This should help explain further:

 

http://msdn.microsoft.com/en-us/library/ie/jj676915(v=vs.85).aspx

Share this post


Link to post
Share on other sites

Thanks for all the help-

 

It actually turned out to be a really dumb thing that had me chasing my tail. I forgot to disable calls to console.log() which crashes the program in IE9 - but only if the console is not open! I took out the console calls and it works without any of the IE-Edge stuff. Thanks again.

Share this post


Link to post
Share on other sites

Ah yes, that old chestnut! Here, this might help in the future :)

(function() {    var consoleDisabled = false;    if (consoleDisabled) {        window.console = undefined;    }    if (window.console === undefined) {        window.console = {            debug: function() {                return true;            },            info: function() {                return false;            },            warn: function() {                return false;            },            log: function() {                return false;            }        }    }    debug = (function(args) {        window.console.debug(args);    });    info = (function(args) {        window.console.info(args);    });    warn = (function(args) {        window.console.warn(args);    });    log = (function(args) {        window.console.log(args);    });})();

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.