On Tue, Mar 27, 2018 at 10:50 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > On Tue, 27 Mar 2018 22:25:44 +1100, Chris Angelico wrote: > >> On Tue, Mar 27, 2018 at 9:49 PM, Steven D'Aprano >> <steve+comp.lang.pyt...@pearwood.info> wrote: >>> As an extra bonus, even when searching is not reliant on Javascript, >>> mangling the text in the search box often is, so unless I'm extra >>> careful, whenever I want to search for (say) "aardvarks", I invariably >>> end up searching for "searaardvarksch". >>> >>> At least the new PyPI search box is better than that. They get a point. >>> >>> >> "Mangling the text" should never be necessary. The HTML5 <input> tag has >> a 'placeholder' attribute for a reason. > > > You're assuming the page is using HTML5. I've used a lot of these that > did it in Javascript, and didn't degrade gracefully if Javascript was > disabled. >
Any time you see something that requires JavaScript for this, you know you've found a web site that dates back to... uhh, actually I don't know. I only have versioning info on MDN back as far as HTML 4.01 ergo 1999, and the placeholder attribute is there. Of course, that doesn't mean everyone *used* it, but it was certainly available. ChrisA -- https://mail.python.org/mailman/listinfo/python-list