mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
18 lines
360 B
Java
18 lines
360 B
Java
class NativeNumber extends JSObject {
|
|
|
|
NativeNumber(double p) {
|
|
super("Number");
|
|
d = p;
|
|
}
|
|
|
|
JSValue defaultValue(Environment theEnv, String hint) {
|
|
if (hint.equals("String"))
|
|
return new JSString(Double.toString(d));
|
|
else
|
|
return new JSDouble(d);
|
|
}
|
|
|
|
double d;
|
|
|
|
|
|
} |