Add javascript DOM related piece of code