You never pass the domElement into the constructor as your code is now.