function getContainer(p) {
            var container = document;
            if (typeof p === 'string' && p[0] === '#') {
              p = p.slice(1);
              container = document.getElementById(p) || document;
            } else if (p instanceof _main.default.Element) {
              container = p.elt;
            } else if (p instanceof HTMLElement) {
              container = p;
            }
            return container;
          }
Helper function for getElement and getElements.