Re: [dom] Is it recommended to use Node.getFeature() or Node.isSupported()?
"Tab Atkins Jr." <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CAAWBYDC_1AQCt2JpZRJi9KAhxZsxQPCYKQU_tFzzLGqTdHEJ4Q@mail.gmail.com> |
On Wed, Aug 21, 2013 at 5:56 PM, Boris Zbarsky <[email protected]> wrote: > On 8/21/13 8:43 PM, James Craig wrote: >> >> if (typeof document.body.ondismissrequest !== "undefined") { > > > Just if ("ondismissrequest" in document.body), I'd think. Yeah, this is all you need to do. It's not perfect, but web devs are good at making a racket when we accidentally ship something that passes this test but doesn't actually work. ~TJ