Update to standards based AudioContext.

(https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext).
Check that event target is a node in toggleNode event.