MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / run

Method run

code/main/RenderLinkSimpleInput.ts:17–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16 // Public methods
17 public run(): void{
18 // We copy the render link so we can use it in the functions below
19 var renderLink: RenderLinkSimpleInput = this;
20
21 // If the default value isn't null
22 if(this.defaultValue != null){
23 // We set the default value
24 $(this.element).val(this.defaultValue);
25 }
26
27 // We set the change event
28 $(this.element).change(function(event){
29 // We fire the callback collection
30 renderLink.callbackCollection.fire();
31
32 return false; // Avoid event bubbling
33 });
34
35 if(this.hasFocus) $(this.element).focus();
36 }
37}

Callers

nothing calls this directly

Calls 5

$Function · 0.85
valMethod · 0.80
changeMethod · 0.80
focusMethod · 0.80
fireMethod · 0.65

Tested by

no test coverage detected