* Return the element unformatted value as a real Javascript number. * Warning: This can lead to precision problems with big numbers that should be stored as strings. * * @usage anElement.getNumber() * * @param {function|null} callback If a callback is passed, then the result
(callback = null)
| 2526 | * @returns {number|null} |
| 2527 | */ |
| 2528 | getNumber(callback = null) { |
| 2529 | let result; |
| 2530 | if (this.rawValue === null) { |
| 2531 | result = null; |
| 2532 | } else { |
| 2533 | result = this.constructor._toLocale(this.getNumericString(), 'number', this.settings); |
| 2534 | } |
| 2535 | |
| 2536 | this._executeCallback(result, callback); |
| 2537 | |
| 2538 | return result; |
| 2539 | } |
| 2540 | |
| 2541 | /** |
| 2542 | * Returns the unformatted value, but following the `outputFormat` setting, which means the output can either be : |
no test coverage detected