[whatwg] Detecting Web Forms for future proof scripts?
me at shawnwilsher.com
Mon Oct 2 09:00:02 PDT 2006
Hopefully, you aren't duplicating work that has already been done here:
Granted, this is only for IE, but nearly half of your work is already done then.
On 10/2/06, Ric Hardacre <ric at hardacre.org> wrote:
> Forms 2.0 spec in HTML 4 documents. Firstly, they obviously need to
> degrade for non-scripting UAs, which is easy enough. Secondly they need
> to check that they're running on a compatible scripting engine, just
> checking for the existence of document.getElementById is the simple way
> (If there are better ways then I'm always open to learning). But I'm
> presented with an issue, suppose for example I wanted to emulate the
> datalist element for a text box. I can use the DOM and some on-the fly
> ensuring that if/when it encounters a browser that can handle the
> datalist that it does not execute? This is probably quite an open
> question and yes I'm aware of the embedding-a-select-inside-the-datalist
> solution to this particular example, but the general question remains:
> How to script WF2 functionality for current browsers in a way that both
> degrades AND yields to the UA when it can handle the functionality natively?
> Ric Hardacre
More information about the whatwg