CD-452 Part VI . Appendixes (Web hosting billing) An important part
CD-452 Part VI . Appendixes An important part of the listing is the way the action of sizing and showing the positioned element is broken out as a separate function (setHiliter()) from the one that is the onClickevent handler function (handleClick()). This is done so that the onResize event handler can trigger a script that gets the current rectangle for the last element clicked, and the positioned element can be sized and moved to maintain the highlight of the same text. As an experiment, try removing the onResize event handler from the
tag and watch what happens to the highlighted rectangle after you resize the browser window: the rectangle that represents the TextRectangleremains unchanged and loses track of the abstract TextRectangle associated with the actual element object. Listing 19-12: Using the TextRectangle Object Properties