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

Method run

code/main/RenderLinkCheckbox.ts:15–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14 // Public methods
15 public run(): void{
16 // We copy the render link so we can use it in the functions below
17 var renderLink: RenderLinkCheckbox = this;
18
19 // We set the change event
20 $(this.element).change(function(event){
21 if($(this).is(':checked')){
22 // We fire the callback collection
23 renderLink.callbackCollectionWhenChecked.fire();
24 }
25 else{
26 renderLink.callbackCollectionWhenUnchecked.fire();
27 }
28
29 return false; // Avoid event bubbling
30 });
31 }
32}

Callers

nothing calls this directly

Calls 4

$Function · 0.85
changeMethod · 0.80
isMethod · 0.80
fireMethod · 0.65

Tested by

no test coverage detected