aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/webgl2renderingcontext.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index 3b666f515e2..af11e947eda 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -443,6 +443,16 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
fn GetParameter(&self, cx: JSContext, parameter: u32) -> JSVal {
match parameter {
+ constants::VERSION => unsafe {
+ rooted!(in(*cx) let mut rval = UndefinedValue());
+ "WebGL 2.0".to_jsval(*cx, rval.handle_mut());
+ return rval.get();
+ },
+ constants::SHADING_LANGUAGE_VERSION => unsafe {
+ rooted!(in(*cx) let mut rval = UndefinedValue());
+ "WebGL GLSL ES 3.00".to_jsval(*cx, rval.handle_mut());
+ return rval.get();
+ },
constants::MAX_CLIENT_WAIT_TIMEOUT_WEBGL => {
return Int32Value(
self.base.limits().max_client_wait_timeout_webgl.as_nanos() as i32