document.html referer

Talk about add-ons and extension development.
Post Reply
Diamanti
Posts: 778
Joined: June 12th, 2008, 9:02 am

document.html referer

Post by Diamanti »

when:

html, body{
background-color:#000 !important;
}

in js i referer to body in extension with:
content.document.body

content.document.html no work.
how referer to html?
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: document.html referer

Post by morat »

You should use document.documentElement to get the root element.

Code: Select all

alert(content.document.documentElement.tagName); // HTML
Diamanti
Posts: 778
Joined: June 12th, 2008, 9:02 am

Re: document.html referer

Post by Diamanti »

ty
Post Reply