First version:
ExternalInterface.call("$(document).trigger", "opened_file_chooser");
Second version:
ExternalInterface.call("$(document).trigger('opened_file_chooser')");
If I use the first version, it's much, much slower than the second. Also, the browser blocks, and after a few seconds Firefox shows me the dialog with "A script is not responding ... " and it offers me the possibility of stopping it. If I use the 2nd version, the call to Javascript is instantaneous. Is there a way I could make the first one work as well as the second? I think it's much cleaner ( from a code point of view ).