I'm working on a fieldtype with a lot of javascript and I use the following to get EE constants in the js:
$this->EE->javascript->set_global(array('THIRD_PARTY_THEME_URL' => URL_THIRD_THEMES));
This works well in the Control Panel, but not in Safecracker, which seems to reset all the EE js object.
Any idea how I can pass those kind of constants?