Open deep-gaurav opened 1 month ago
This could be easily added to the list of Rust keywords, but unfortunately it requires much more plumbing to generate duplicate methods to avoid a breaking change.
I'm happy to look over a PR, which can also deprecate the old methods.
Unfortunately I dont think I've enough knowledge of how web-sys/wasm_bindgen works internally to make PR. If you can point me somewhere to getstarted on learning it, I would be willing to look into it.
If you can point me somewhere to getstarted on learning it, I would be willing to look into it.
I don't think we have any documentation on the internal code architecture that would help with this. To get started you would just have to dig into the code.
Motivation
So I was working with WebRTC Media Stream Track and was cloning with with
.clone()
thinking it'll do shallow clone just like how all other web-sys api does shallow clone, butMediaStreamTrack
has a clone method in js too that does deep clone which is what is invoked here. It becomes very hard to debug unless you know this. maybe we can mark it somehow?Proposed Solution
Not exactly sure what can be done but maybe rename deep clone?
Alternatives
We can also just do some linting for it?
Additional Context
NA