ianharrigan

Untitled

Dec 29th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.41 KB | None | 0 0
  1. package haxe.ui.html5.native.behaviours;
  2.  
  3. import haxe.ui.core.Behaviour;
  4. import haxe.ui.util.Variant;
  5. import js.html.Element;
  6.  
  7. class ElementText extends Behaviour {
  8.     public override function set(value:Variant) {
  9.         var el:Element = cast _component.element;
  10.         el.textContent = value;
  11.     }
  12.    
  13.     public override function get():Variant {
  14.         var el:Element = cast _component.element;
  15.         return el.textContent;
  16.     }
  17. }
Add Comment
Please, Sign In to add comment