Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!news.internetdienste.de!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <4773292.ypaU67uLZW@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 08 Nov 2011 21:34:02 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: David Mark's Javascript Tip of the Day - Volume #1 - #Tip 14-C Newsgroups: comp.lang.javascript References: <4eb969cb$0$28705$a8266bb1@newsreader.readnews.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 38 NNTP-Posting-Date: 08 Nov 2011 21:34:04 CET NNTP-Posting-Host: 1d29e0b3.newsspool3.arcor-online.net X-Trace: DXC=EoF?7:YC\A?=FQB?mjjV50McF=Q^Z^V384Fo<]lROoR18kFDZm8W4\YJN<;?f@h5gMfb\46n?53h7LYL[]1N0 X-Complaints-To: usenet-abuse@arcor.de Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:8144 Denis McMahon wrote: > On Tue, 08 Nov 2011 04:17:19 -0800, David Mark wrote: >> David Mark's Javascript Tip of the Day - Volume #1 - #Tip 14-C > > […] > We have a faq server, It is spelled _FAQ_, and the server is frequently down, unfortunately. Also, I do not think that the FAQ covers this subject. I value David's pointing out that the Webkit bug with dynamically created `button' elements can be worked around with setAttribute(), as I had problems with that when creating widgets (for a quick solution I had opted to use `input[type="button"]' elements instead of `button' elements, but the latter are more flexible). Also, it is important to realize that the value of an attribute as retrieved with getAttribute() can be misleading. For a practical example, there is (was?) a jQuery UI component which attempted to provide a fallback for HTML5's type="date". But it used jQuery's attr() method for detection. Since the attr() method always uses the getAttribute() method in Gecko-based browsers, the plugin was unable to detect that Firefox did not support the attribute's `date' value (the attribute property yielded "text" which would have shown that), and that applying the fallback was indicated. As a result, the corresponding `input' element stopped working in Firefox (text- based date input impossible, as all keyboard events had been canceled by the plugin) until that jQuery plugin had been eliminated from the project's code base. > we have Thomas 'pointed ears' Lahn, _PointedEars_, please. -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs,