UsageNotes/Javascript

From Facebook Developer Wiki

Jump to: navigation, search

[edit] Javascript

Facebook has introduced a restricted, but functional version of JavaScript for use on Facebook. Only onClick attributes and the like are allowed directly in the html of an object; All other events must be registered as listeners. No JavaScript, including listeners, will be registered until the user clicks on a FBJS-enabled object. Facebook automatically rewrites variable and functions to appid_functionname, however they have created specific functions to access certain global functions that will not be rewritten.

reference