chrome javascript dom remove iframe backgroundimage -
chrome javascript dom remove iframe backgroundimage -
i've been messing iframe chrome extensions , seem running lot of issues iframes. anyways, have iframe injected website(cross-domain). i'd iframes background image inherit parents page background(so blends in). trying:
//setup iframe attributes iframe.setattribute("id","injected_frame"); iframe.setattribute("src", 'google.com'); iframe.setattribute("width","100%"); iframe.setattribute("height","425"); iframe.setattribute("frameborder","0"); iframe.setattribute("scrolling","auto"); iframe.setattribute("style","backgroundimage: inherit"); <-- undefined error
basically doesn't work, background stays same , undefined error when trying this.
you alter "backgroundimage: inherit"
"background-image: inherit"
, other inline styles on iframe
may lost because believe reset style attribute completely.
thus, instead recommend replacing lastly line iframe.style.backgroundimage = "inherit";
javascript dom google-chrome iframe
Comments
Post a Comment