Project

General

Profile

Actions

Feature #16813

closed

JSeventFuncCalls onunload

Added by Christoph Koehler almost 18 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-12-26
Due date:
% Done:

0%

Estimated time:
PHP Version:
5
Tags:
Complexity:
Sprint Focus:

Description

onunload didn't work with JSeventFunCalls but might be required, for example with Google Maps to fix some memory leaks with IE.
Attached is a patch that adds that feature just like onload:
$GLOBALS["TSFE"]->JSeventFuncCalls["onunload"][tx_bla]="GUnload();";

(issue imported from #M4701)


Files

jseventunload.patch (1.47 KB) jseventunload.patch Administrator Admin, 2006-12-26 21:31
jseventunload-new.patch (1.37 KB) jseventunload-new.patch Administrator Admin, 2006-12-28 11:22
events.diff (3.25 KB) events.diff Administrator Admin, 2007-02-03 14:01

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #16229: onunload missing in JSeventFuncCallsClosedMartin Kutschker2006-06-12

Actions
Actions #1

Updated by Christoph Koehler almost 18 years ago

Uploaded new patch, the old one wasn't quite right, so just ignore that one. Sorry about that!

Actions #2

Updated by Martin Kutschker almost 18 years ago

Added a new patch which allows for arbitrary events.

Actions #3

Updated by Christoph Koehler almost 18 years ago

Thanks Martin. I saw the duplicate load call and your comment whether it was necessary, and I am all for removing it. One should be enough.

Actions #4

Updated by Martin Kutschker almost 18 years ago

More questions:

Should we change from document.onXXX to window.onXXX? onload and onunload belong to window not document, but others should stay with document.

OTOH the developer could simply use event listeners.

Actions #5

Updated by Christoph Koehler almost 18 years ago

Not sure since both are valid and I am not a JS guy. I use it for Google Maps which requires the onload stuff to be in the body tag. So as long as I can still do that, I am good.
If they are different (couldn't find anything on Google about that), we could just add them as an option instead of including them all the time automatically.

Actions #6

Updated by Oliver Hader almost 18 years ago

Have a look how this is implemented in prototype.js event handlers ("_observeAndCache"):
http://dev.rubyonrails.org/browser/spinoffs/prototype/trunk/src/event.js#L61

Actions #7

Updated by Martin Kutschker almost 18 years ago

My point was not how, but if we should use evebt listeners.

Actions #8

Updated by Oliver Hader almost 18 years ago

Okay :) IMHO we should use event listeners.

Actions #9

Updated by Michael Stucki almost 18 years ago

Fixed in TYPO3 4.1RC2

Actions #10

Updated by Oliver Hader almost 18 years ago

Committed to Trunk

Actions

Also available in: Atom PDF