I think in all cases, if we have a constructor named FooNode
, the corresponding factory method is called createFoo
. Except for the media nodes. We have
MediaElementAudioSourceNode
-> createMediaElementSource
MediaStreamAudioSourceNode
-> createMediaStream
MediaStreamTrackAudioSourceNode
-> createMediaStreamTrackSource
MediaStreamAudioDestinationNode
-> createMediaStreamDestination
I find this rather annoying because I always forget the the factory method is named slightly differently from the node.