Skip to content

Tag: javascript

getAttribute is not available on the ElementHandle

I’m using playwright version 0.13.0, I have an instance of ElementHandle, but the getAttribute function is not available, calling it throws an error saying getAttribute is not a function: I double-checked with the debugger, the function is not on the instance. Also, there’s no equivalent of page.e…

WebRTC change microphone or webcam while in call

I am trying to figure out how to change the microphone or webcam while you are in a videochat with someone. I have been now trying for a few days and nothing works. I was following this example, but it seems it is much harder to achieve the change while someone is already connected. The issues I have: If I

How to flatten an object with nested objects in javascript

I have some attributes from a nested object that is inside the parent object but I would like to merge nested object with the parent object to be flatten. Original object: expected flatten object: Answer You can recursively build object any number of nested objects. So, this function is not your case dependen…