- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 19 Jun 2013 11:20:32 -0700
- To: Benoit Jacob <jacob.benoit.1@gmail.com>
- Cc: WHATWG <whatwg@lists.whatwg.org>
On Wed, Jun 19, 2013 at 11:17 AM, Benoit Jacob <jacob.benoit.1@gmail.com> wrote: > So let's look at the naive application usage pattern for supportsContext: > > if (canvas.supportsContext("webgl")) { > context = canvas.getContext("webgl"); > } > > The problem is that the same can be achieved with just the getContext call, > and checking whether it succeeded. The problem that supportsContext() solves, and which was brought up repeatedly during the drive to add this, is that spinning up contexts can be expensive. ~TJ
Received on Wednesday, 19 June 2013 18:21:16 UTC