prototype.__defineGetter__() equivalent in Konqueror

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chung Leong

    prototype.__defineGetter__() equivalent in Konqueror

    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

    #2
    Re: prototype.__def ineGetter__() 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:



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

    PointedEars

    Comment

    Working...