try use document.head 

see https://developer.mozilla.org/zh-CN/docs/DOM/document.head