Connecting Tech Pros Worldwide Forums | Help | Site Map

prototype.__defineGetter__() equivalent in Konqueror

Chung Leong
Guest
 
Posts: n/a
#1: Jul 20 '05
Is there an equivalent in Konqueror's KJS engine to Gecko's
__defineGetter__() and __defineSetter__() methods? Our web application
uses a ton of Javascript, written based on Internet Explorer's object
model as that's the primary platform that we're supporting. For
Netscape support we uses __defineGetter__() and __defineSetter__() to
emulate the many IE-only properties. I've tested our site using
Safari, and to my surprise, it renders perfectly. Alas, it's
completely non-functional. If it's somehow possible, I'd love to write
a similar emulation library for KJS so that our non-Windows users
would have an alternative to crummy Netscape/Mozilla.

Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
#2: Jul 20 '05

re: prototype.__defineGetter__() equivalent in Konqueror


Chung Leong wrote:
[color=blue]
> [...] Our web application uses a ton of Javascript,[/color]

Can users without JavaScript use it? If not, your design is flawed.
[color=blue]
> written based on Internet Explorer's object model as that's the
> primary platform that we're supporting.[/color]

Why on earth? Don't trust so-called "statistics", they are no
statistics at all.
[color=blue]
> For Netscape support we uses __defineGetter__() and
> __defineSetter__() to emulate the many IE-only properties.[/color]

See? Get a hack on that proprietary code you are using, making
it standards-compliant since this is the direction in which the
Web is developing (recent IEs do support them, too). You do not
need the most of it, so you do not need to emulate the whole DOM.
And no, I do not know how to emulate the IE-DOM with KJS since I
write standards-compliant code where possible and therefore code
that can be used in the foreseeable future, independent of the
vendor which saves you a lot of trouble, once you turn around.

You may find this interesting:
http://devedge.netscape.com/viewsour...edge-redesign/


X-Post cwx.kde, cljs & F'up2 cljs

PointedEars
Closed Thread


Similar JavaScript / Ajax / DHTML bytes