number property

double get number

Converts a JavaScript value to number and returns the resulting number. exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.

Implementation

double get number {
  final JSException exception = JSException.create(context);
  final double ret = JSValueToNumber(context.ref, _ref, exception.ref);
  if (exception.shouldThrow) throw exception.error;
  return ret;
}