Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34324

Re: Object.create(canvas.getContext())

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Object.create(canvas.getContext())
Date 2017-11-12 18:45 +0100
Organization PointedEars Software (PES)
Message-ID <2051568.ElGaqSPkdT@PointedEars.de> (permalink)
References <ou96ju$mvd$1@gwaiyur.mb-net.net>

Show all headers | View raw


Jan Bruns wrote:

>   dolog(gl.__proto__); // prints "[object WebGL2RenderingContext]"

The standards-compliant approach is

  Object.getPrototypeOf(gl)

instead of

  gl.__proto__

It is available since ECMAScript Edition 5.0 (2009-12).

<http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262%205th%20edition%20December%202009.pdf#page=122>

<http://www.ecma-international.org/ecma-262/8.0/index.html#sec-object.getprototypeof>
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Object.create(canvas.getContext()) Jan Bruns <ebay@abnuto.de> - 2017-11-12 10:09 +0000
  Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-12 17:42 +0100
    Re: Object.create(canvas.getContext()) Jan Bruns <ebay@abnuto.de> - 2017-11-14 11:48 +0000
      Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-15 02:32 +0100
        Re: Object.create(canvas.getContext()) Jan Bruns <ebay@abnuto.de> - 2017-11-17 20:25 +0000
          Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-19 05:48 +0100
            Re: Object.create(canvas.getContext()) Jan Bruns <ebay@abnuto.de> - 2017-11-19 21:39 +0000
              Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-19 23:34 +0100
                Re: Object.create(canvas.getContext()) Jan Bruns <ebay@abnuto.de> - 2017-11-20 14:47 +0000
                Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-21 04:07 +0100
                Re: Object.create(canvas.getContext()) Jan Bruns <ebay@abnuto.de> - 2017-11-21 16:23 +0000
                Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-22 04:12 +0100
  Re: Object.create(canvas.getContext()) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-12 18:45 +0100

csiph-web