public static boolean isValidCallback ( String pCallback ) { Pattern validJavaScriptFunctionNamePattern = Pattern . compile ( "^[$A-Z_][0-9A-Z_$]*$" , Pattern . CASE_INSENSITIVE ) ; return validJavaScriptFunctionNamePattern . matcher ( pCallback ) . matches ( ) ; }
Check that a callback matches a javascript function name . The argument must be not null