Something like:
proc newAudioContext*(): AudioContext {.importjs: "new (window.AudioContext
|| window.webkitAudioContext)()".}
Run
- How to do feature detection with JS backend? ftsf
- Re: How to do feature detection with JS backend? Araq
