Bug 20165 - javascript function closures simply do not work.
Summary: javascript function closures simply do not work.
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: Compiled Sources Other
: NOR grave
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-09 16:33 UTC by bug-kde-org
Modified: 2002-09-16 14:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bug-kde-org 2001-02-09 16:20:04 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: kjs
Version: 2.1 Beta 2
Severity: grave
Installed from: Source

The idiom that's failing is this:

function F () {
this.blah = function () { return 0; };
}

var fff = new F();

For an example see

http://tribble.ilrt.bris.ac.uk/~cmjg/test/functional

(you'll need to examine the source). Other examples (more extensive) at

http://tribble.ilrt.bris.ac.uk/~cmjg/logic/prolog-latest

(see these in a recent Netscape for comparison)


(submitted via bugs.kde.org)
Comment 1 Harri Porten 2001-03-08 22:11:39 UTC
> Package: kjs
> Version: 2.1 Beta 2
> Severity: grave
> Installed from: Source
> 
> The idiom that's failing is this:
> 
>         function F () {
>                 this.blah = function () { return 0; };
>         }
> 
>         var fff = new F();

Fixed now (probably already in KDE 2.1).
 
> For an example see
> 
> http://tribble.ilrt.bris.ac.uk/~cmjg/test/functional

Works.

> (you'll need to examine the source). Other examples (more extensive) at
> 
> http://tribble.ilrt.bris.ac.uk/~cmjg/logic/prolog-latest

An error message somewhere but I'm sorry to say that I don't feel like
debugging that complex piece of code. If you can extract the guilty part
feel free to file another report.

Thanks

Harri.