impl window self

in order to Implement window.self
#868