@@ -865,21 +865,36 @@ test( "_on() with delegate to descendent", function() {
865865} ) ;
866866
867867test ( "_on() to common element" , function ( ) {
868- expect ( 1 ) ;
868+ expect ( 4 ) ;
869869 $ . widget ( "ui.testWidget" , {
870870 _create : function ( ) {
871871 this . _on ( this . document , {
872- "customevent" : "_handler"
872+ "customevent" : "_handler" ,
873+ "with:colons" : "_colonHandler" ,
874+ "with-dashes" : "_dashHandler" ,
875+ "with-dashes:and-colons" : "_commbinedHandler"
873876 } ) ;
874877 } ,
875878 _handler : function ( ) {
876879 ok ( true , "handler triggered" ) ;
880+ } ,
881+ _colonHandler : function ( ) {
882+ ok ( true , "colon handler triggered" ) ;
883+ } ,
884+ _dashHandler : function ( ) {
885+ ok ( true , "dash handler triggered" ) ;
886+ } ,
887+ _commbinedHandler : function ( ) {
888+ ok ( true , "combined handler triggered" ) ;
877889 }
878890 } ) ;
879891 var widget = $ ( "#widget" ) . testWidget ( ) . testWidget ( "instance" ) ;
880892 $ ( "#widget-wrapper" ) . testWidget ( ) ;
881893 widget . destroy ( ) ;
882894 $ ( document ) . trigger ( "customevent" ) ;
895+ $ ( document ) . trigger ( "with:colons" ) ;
896+ $ ( document ) . trigger ( "with-dashes" ) ;
897+ $ ( document ) . trigger ( "with-dashes:and-colons" ) ;
883898} ) ;
884899
885900test ( "_off() - single event" , function ( ) {
0 commit comments