get elem when document prepared