@@ -97,6 +97,7 @@ const PROTO_DECLS: &[Declaration] = declare_properties! {
97
97
"thickness" => property( tf_getter!( thickness) , tf_setter!( set_thickness) ) ;
98
98
// NOTE: `tabEnabled` is not a built-in property of TextField.
99
99
"tabIndex" => property( tf_getter!( tab_index) , tf_setter!( set_tab_index) ; VERSION_6 ) ;
100
+ "styleSheet" => property( tf_getter!( style_sheet) , tf_setter!( set_style_sheet) ; VERSION_7 ) ;
100
101
} ;
101
102
102
103
/// Implements `TextField`
@@ -955,3 +956,26 @@ pub fn set_condense_white<'gc>(
955
956
this. set_condense_white ( activation. context , condense_white) ;
956
957
Ok ( ( ) )
957
958
}
959
+
960
+ pub fn style_sheet < ' gc > (
961
+ this : EditText < ' gc > ,
962
+ _activation : & mut Activation < ' _ , ' gc > ,
963
+ ) -> Result < Value < ' gc > , Error < ' gc > > {
964
+ Ok ( match this. style_sheet_avm1 ( ) {
965
+ Some ( style_sheet) => Value :: Object ( style_sheet) ,
966
+ None => Value :: Undefined ,
967
+ } )
968
+ }
969
+
970
+ pub fn set_style_sheet < ' gc > (
971
+ this : EditText < ' gc > ,
972
+ activation : & mut Activation < ' _ , ' gc > ,
973
+ value : Value < ' gc > ,
974
+ ) -> Result < ( ) , Error < ' gc > > {
975
+ let style_sheet = match value {
976
+ Value :: Object ( object) => Some ( object) ,
977
+ _ => None ,
978
+ } ;
979
+ this. set_style_sheet_avm1 ( activation. context , style_sheet) ;
980
+ Ok ( ( ) )
981
+ }
0 commit comments