-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: janusweb action: commit revision: path_from: revision_from: a2004b0f780eab8582642dcd00334c5d69859702: path_to: revision_to:
commit a2004b0f780eab8582642dcd00334c5d69859702 Author: James Baicoianu <james_github@baicoianu.com> Date: Thu Oct 22 14:33:53 2020 -0700 Pass correct target with bubbled events diff --git a/scripts/janusbase.js b/scripts/janusbase.js
--- a/scripts/janusbase.js +++ b/scripts/janusbase.js @@ -1009,7 +1009,7 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f event.target = target || event.element; } var handlerfn = 'on' + event.type; - if (this[handlerfn]) { + if (handlerfn in this) { this.executeCallback(this[handlerfn], event); } // Bubble event up to parents, unless the event was thrown with bubbling disabled or an event handler called stopPropagation() @@ -1017,7 +1017,8 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f let returnValue = true; firedev.forEach(e => returnValue &= e.returnValue); if (event.bubbles !== false && returnValue && this.parent && this.parent.dispatchEvent) { - this.parent.dispatchEvent(event, event.target); + event.element = this.parent; + this.parent.dispatchEvent(event); } } this.addEventListenerProxy = function(name, handler, bubble) {
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 16:26:22 2024