fix issue #9: attachStream should accept DOMElement and css selector