Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2424535.5OGg1D6guJ@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 22 Feb 2013 01:12:59 +0100 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. tag in IE Newsgroups: comp.lang.javascript References: <2542700.24A3Wqytjl@PointedEars.de> <8809769.VO6lmAGIsZ@PointedEars.de> <2710705.sg4g0aCLjx@PointedEars.de> <1522652.FLkxLQDhY3@PointedEars.de> <1573878.qxiknB9TEh@PointedEars.de> <2605981.XCImaMMTPp@PointedEars.de> <1938874.cQ9pN8IgLJ@PointedEars.de> <4c255389-833f-41d2-9423-c653e61836d6@k14g2000vbv.googlegroups.com> <1519059.xktq26biNk@PointedEars.de> <10162ad4-045e-40d8-914d-f52850d7fa19@fw24g2000vbb.googlegroups.com> MIME-Version: 1.0 Lines: 31 NNTP-Posting-Date: 22 Feb 2013 01:13:06 CET NNTP-Posting-Host: 8ebecc84.newsspool1.arcor-online.net X-Trace: DXC=T6^0BNMF[3RPU8j_I0DN6_ic==]BZ:af^4Fo<]lROoRQnkgeX?EC@@P1CEWAg0_HNUDZm8W4\YJN\b@mF9jNikdU3>YBYU3JEo]h8NIV>6JU;Q X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:18590 Scott Sauyet wrote: > […] I'm quite certain that no sane implementor would create a > new Function instance every time the event listener is needed. But > beyond that, it's not clear to me whether a lazy instantiation would > be better because the listener might never be called, or if there is some > spin-up time for the compiler that would make it simpler to pre-compile > them all. Certainly. That there is a Function instance when the property is accessed does not need to mean that there is also a Function instance when it is not. It appears to be prudent that there is a getter that creates the Function instance and returns a reference to it not before the property is accessed, or there may be a factory that creates the Function instance when the event is dispatched to the element. Insofar one should generally expect event-handler attributes to be more efficient than event-handler properties (and their correspondent API features) because with the latter the Function instance needs to be created first (by the developer). > And then there is the question of redefining the event-handler > attributes... What is the question? -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.