native javascript method to create dom objects