mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +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;
|
|
|
|
|
|
} |