MCPcopy Create free account
hub / github.com/braziljs/eloquente-javascript / clicked

Method clicked

code/animatevillage.js:112–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 }
111
112 clicked() {
113 if (this.timeout == null) {
114 this.schedule()
115 this.button.textContent = "Stop"
116 this.robotElt.firstChild.src = this.imgPath + "robot_moving2x.gif"
117 } else {
118 clearTimeout(this.timeout)
119 this.timeout = null
120 this.button.textContent = "Start"
121 this.robotElt.firstChild.src = this.imgPath + "robot_idle2x.png"
122 }
123 }
124 }
125
126 window.runRobotAnimation = function(worldState, robot, robotState) {

Callers 1

constructorMethod · 0.95

Calls 1

scheduleMethod · 0.95

Tested by

no test coverage detected