Dont assume head exists

This commit is contained in:
Kovid Goyal 2018-07-28 07:19:19 +05:30
parent cae36d2cc1
commit 50ed25a6d9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -256,7 +256,7 @@ class PreviewIntegration:
if window is window.top:
setTimeout(self.connect_channel, 10)
document.body.addEventListener('click', self.onclick, True)
document.head.appendChild(E.style(
document.documentElement.appendChild(E.style(
type='text/css',
'[data-in-split-mode="1"] [data-is-block="1"]:hover { cursor: pointer !important; border-top: solid 5px green !important }'
))