This project is archived and is in readonly mode.

#1082 ✓wontfix
Ricardo Graça

Error loading Mootools 1.3 on Konqueror

Reported by Ricardo Graça | November 11th, 2010 @ 04:23 PM | in 1.3.1 (closed)

This error shows up in the error console on Konqueror version 4.5.3 and obviously it fails to load the library. With mootools 1.2.4 there is no error and everything works fine.

TypeError: Attempt to use a non-function object or a value as a function.

The error is related to line 2783 which is around here:

/*<ltIE8>*/
var createElementAcceptsHTML;
try {
    var x = document.createElement('<input name=x>');
    createElementAcceptsHTML = (x.name == 'x');
} catch(e){}

var escapeQuotes = function(html){
    return ('' + html).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
};
/*</ltIE8>*/

Comments and changes to this ticket

  • Arian

    Arian November 11th, 2010 @ 06:16 PM

    • Milestone set to 1.3.1
    • Assigned user set to “Arian”
    • Milestone order changed from “829” to “0”

    Thanks for reporting, we don't officially support Konqueror, but I can look at if you tell me how to properly debug in Konqueror.

    I get some error window, but that doesn't even tell me which line it errors.
    I commented out those lines (which are only for IE, and it still doesn't work, so I don't think that's it.

  • Ricardo Graça

    Ricardo Graça November 11th, 2010 @ 10:05 PM

    I know you don't support Konqueror so thanks. This could be a konqueror bug, in which case I will report it in the right place if we can figure out what the bug is.
    It probably has something to do with the document.createElement() part, since that's the line that the debugger complaints about.

    To debug JS in Konqueror you have to go to settings/konqueror settings/Java & JavaScript and then in the JavaScript tab tick the Activate the debugger and Error Reporting select boxes. (Instructions loosely translated from my system that is in portuguese)

  • Arian

    Arian November 11th, 2010 @ 10:23 PM

    • State changed from “new” to “invalid”

    I think it is a Konqueror bug, because that statement is in a try-catch block, so even if it errors, it shouldn't hurt.

    Even when i run the following code from the debug console it errors and alerts hi:

    try { throw new TypeError('foo'); } catch(e){ alert('hi'); }
    

    When I run this in Chrome, it only alerts hi without errors, so the exception was caught correctly.
    So maybe you can forward this to the Konqueror devs or search their bugtracker for any clues?

  • Thomas Aylott

    Thomas Aylott November 11th, 2010 @ 10:31 PM

    • State changed from “invalid” to “hold”
    • Assigned user changed from “Arian” to “Thomas Aylott”

    Maybe I'll look into a possible workaround. I take it personally when any of my code fails, even in unsupported browsers. This could be a pretty simple and easy fix.

  • Thomas Aylott

    Thomas Aylott November 11th, 2010 @ 10:34 PM

    hmm… apparently if try/catch itself is broken then I'm not sure what you can really do.
    I guess you could UA sniff for Konqueror and then skip the try/catch completely.

  • Thomas Aylott

    Thomas Aylott November 11th, 2010 @ 10:36 PM

    • State changed from “hold” to “wontfix”

    yeah, If anyone desperately needs to support a browser that doesn't support try/catch then they'll have to hack the code themselves.

  • Ricardo Graça

    Ricardo Graça November 12th, 2010 @ 02:07 PM

    It seems to be an error in the try...catch behaviour of konqueror at least since version 4.1.2, from about 2 years ago. If it's ever fixed I'll report back. See you in the future.

  • Ricardo Graça

    Ricardo Graça November 15th, 2010 @ 03:31 PM

    Funny. One of the konqueror devs says that the problem is something else and he offers an alternative method of debugging besides try catch:

    https://bugs.kde.org/show_bug.cgi?id=172332#c6

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages