Accept element or id

I accidentally got a bunch of whitespace changes in here because my editor automatically strip out extra whitespace when I save, but you may still accept this PR. The crux of this is just to allow the constructor to accept the HTMLElement as the argument directly instead of only accepting the string value for the id of the element.