Mac OS X javascript
Darin Adler
darin at apple.com
Sun Feb 8 22:19:32 CET 2004
On Feb 8, 2004, at 11:11 AM, Harri Porten wrote:
> I'm not employed by Apple Computers.
I do work for Apple Computer.
>> I noticed today that a certain feature (it happened to be how the
>> "constructor" property) was handled differently in Safari from all
>> other browser/platform implementations. The following code:
>>
>> <script language="Javascript">
>> function Circle(radius) {this.r = radius;}
>> var c = new Circle(1.0); // Create an instance of the Circle
>> class.
>> if (c.constructor == Circle) {alert("Circle");} else
>> {alert("What?");}
>> </script>
>>
>> produced "What?" in Safari, but "Circle" everywhere else.
>
> Works fine in Konqueror from KDE 3.2. Guess there's patch missing in
> the JavaScriptCore tree.
This was broken in Safari 1.0, but I fixed it in October and it works
fine in Safari 1.1 and newer.
I sent the patch to khtml-devel on October 2, and Harri rolled it in to
KDE. That's why it works fine in KDE 3.2.
-- Darin
More information about the Khtml-devel
mailing list