Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140817

How do i extend a constructor+method with optional arguments in ES6?

$
0
0

I want to extend the AudioBufferSourceNodeclass so that i can support playback of the sound multiple times. I want to override both the constructor and the start()/stop() methods, but i don't know how to do that in the "correct" way since they have optional arguments and not all the defaults are provided on MDN (1, 2). Coming from OOP languages i expected to find a more precise method signature so that i can build upon that, but i could only find native code.

So what's the most correct way to do that?


Viewing all articles
Browse latest Browse all 140817

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>