allowing to pass a DOM element as container

backwards compatible fix to issue #10