immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
381 stars 84 forks source link

XRWebGLLayer shouldn't expose context attribute #100

Open takahirox opened 4 years ago

takahirox commented 4 years ago

XRWebGLLayer doesn't expose context attribute in the spec

https://www.w3.org/TR/webxr/#xrwebgllayer-interface

but it does in the polyfill

https://github.com/immersive-web/webxr-polyfill/blob/master/src/api/XRWebGLLayer.js#L74

It seems XRWebGLLayer.context is accessed from some places in the polyfill so renaming to _context like _session rather than hiding it would be good?