[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent
 thread


HTMLElement.prototype ... workarround
by Jan on Thursday 13/Jul/2006, @11:01
http://alpha.qunu.com/
in Konqueror-3.5.3 I get
Fehler: http://alpha.qunu.com/qunu.js: ReferenceError: Can't find variable: HTMLElement
[...]

Line 532: {HTMLElement.prototype.removeNode=....
hmm ... we know that HTMLElement prototyping doesn't work out of the box in KTHML-based Browsers - so it seems like they didn't even test their stuff in Safari!

But we are lucky - there is a simple workarround:
http://www.codingforums.com/archive/index.php?t-60406.html

Ajax problems are manly caused by small javascript-cross-browser-differences. But there are well done libraries like http://www.mochikit.com to fix this.

regards, Jan
  Related Links
 ·   Articles on Konqueror
 ·   Also by Jan
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Re: HTMLElement.prototype ... workarround
by SadEagle on Thursday 13/Jul/2006, @11:22
Of course it didn't work --- it's non-standard behavior that's basically an implementation detail of Gecko! Comparable code for Konqueror would be to use
window["[[Element.prototype]]"]. Unfortunately typical "Web 2.0" webmasters seem to think that IE and Mozilla are the only browsers, forcing other browsers to emulate things like this, and also non-standard language extensions like getters/setters (typical pattern seems to be to use Mozilla extensions to emulate IE extensionw). This does, BTW work in upcoming 3.5.4 to some extent (just for the base classes, KHTML doesn't have separate prototypes for divs and such); and to a fuller extent in development version of Safari.
[ Reply To This | View ]
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "Man, that new web site is pretty nice." -- Miguel de Icaza
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]