Struct web_sys::WebGlContextAttributes doesnt have getter of its field?How can i get the value of field in it?
Additional Details
In Javascript:
var canvas = document.getElementById('canvas');
var gl = canvas.getContext('webgl');
let attr = gl.getContextAttributes();
// I can get the field value.
attr.antialias
but in rust
let antialias_info: WebGlContextAttributes = gl.get_context_attributes().unwrap();
// this will throw error
let antialias = antialias_info.antialias;
attempted to take value of method `antialias` on type `web_sys::WebGlContextAttributes`
method, not a field
This may be that the *.webidl files we use need to be updated, in which case a PR should suffice to update them which will generate the appropriate getters.
Summary
Struct web_sys::WebGlContextAttributes doesnt have getter of its field?How can i get the value of field in it?
Additional Details
In Javascript:
but in rust
And this is the doc of Struct web_sys::WebGlContextAttributes