views:

2817

answers:

4

My Facebook application contains Javascript that works in Firefox and IE, but aborts in Chrome.

In the Javascript console it gives several errors.including:

Uncaught TypeError: Object onloadhooks has no method 'replace'

There are similar errors complaining about a missing method for 'toLowerCase'.

Stop Press Problem no longer occurs. Chrome appears to have patched the error.

+2  A: 

According to the Chrome developers (Issue 1717), this is an issue with the Facebook FBJS library, and something they plan to escalate to Facebook.

I don't have a workaround for this in the meantime.

Oddthinking
Hilarious: A javascript bug in Chrome is the web site's fault? Hahaha. Why does chrome say it is safari? Surely *that* is the real bug.
rq
How do you know it's a Javascript bug in Chrome? Just because it works across a lot of browsers doesn't mean it's not a bug in the sites code.
Craig
@rq, I can see this is a tricky area. My reading is Chrome is very much like Safari in most regards (because they both use WebKit to render the HTML), so saying it is Safari-equivalent probably saves a lot of incompatibilities, but it is different in at least one respect, so maybe you are right.
Oddthinking
This appears to have been fixed in Chrome. Please vote to close as no longer relevant.
Oddthinking
A: 

Facebook itself has problems in Chrome. On some pages the buttons just don't work (like deleting a news entry on your own page).

GeekyMonkey
Agreed, but Facebook manages to limp along in Chrome anyway. I don't want my application to make it worse.
Oddthinking
A: 

i ALWAYS have problems with java anything in google chrome. sucks because i actually like the browser.

double you tee eff

java anything? I don't follow.
Nosredna
A: 

Then how come facebook's applications like 'flixter movies' is able to show FBJS's extended permissions dialog for publishing it to user's and friends wall.?

Gaurav Sharma
This appears to have been fixed in Chrome. Please vote to close question as no longer relevant.
Oddthinking