Register scripts using DOM