cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

Mobile browser error #877

Closed zj831007 closed 9 years ago

zj831007 commented 11 years ago

When I use the latast cocos2d-html5, there have a error: this._adjustSize.bind(this); TypeError:Result of expression 'this._adjustSize.bind' [undefined]
is not a function.

iphone 3gs and some android browser all to error like this, could you change the bind method to others?

Thanks for your great works!

linshun commented 11 years ago

Could you please list the browsers and their version? Thank you.

We had tested safari, chrome, UC, android default browser, Tencent browsers and so on. They all work properly.

zj831007 commented 11 years ago

The default browser of samsung SCH-I919 and the version of android is 2.3.6, and the default browser of IPhone 3GS, IOS4.1 . I add this method to resolve the problem:

if(Function.prototype.bind == undefined){ Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift(); return function(){ return fn.apply(object, args.concat(Array.prototype.slice.call(arguments))); }; }; }

dingpinglv commented 9 years ago

This issue has been fixed, thanks for feedback.