onDOMAttach calling script implementation