4. Bond

Now the score is shown not only by digital numbers but also by using pictograph defined as On.ss.xml and Off.ss.xml. To show them, Score.ss.xml has <g> elements, i.e. SVG groups, with <ss:bond name="Lost"/> and <ss:bond name="Got"/>. Graft given by Score() has properties named "Lost" and "Got" to refer these elements. In airhockey.js, they are score.Lost and score.Got. Stasc bond gives you reference to the dom object. So you can use it with any dom API such as appendChild().
Stasc bond has getter but not setter. If you need to set element, you have to use stasc plug, which is introduced in the next page.
<< >>