Class Calculator
Defined in: calc-1.1.js.
Constructor Attributes | Constructor Name and Description |
---|---|
<private> |
The Calculator class.
|
Field Attributes | Field Name and Description |
---|---|
A reference to the element that contains the calculator.
|
Method Attributes | Method Name and Description |
---|---|
focus()
Gives focus to the calculator display.
|
|
press(button)
Simulates pressing a button on the calculator.
|
|
remove()
Removes the calculator and sets the Calculator object to null.
|
Class Detail
<private>
Calculator()
The Calculator class. Calculator objects are returned by some
methods of the JSCALC object.
Field Detail
container
A reference to the element that contains the calculator.
Method Detail
focus()
Gives focus to the calculator display.
{Object}
press(button)
Simulates pressing a button on the calculator.
- Parameters:
- {Number|String} button
- the button(s) to press - a number can represent multiple buttons, but a string can only represent one
- Returns:
- {Object} the Calculator object
remove()
Removes the calculator and sets the Calculator object to null.