javascript - Background Page in popup- chrome extension -
i embedding dynamic webpage in popup. working , every time popup loaded webpage loaded again, me losing work did on webpage in popup. though fine, want webpage remain loaded in background , show in popup on click. copied complete code pop page(script+html) background.html. how should access page in popup , show directly(i want show html also-from background page)
thanks
popups live in same process (the extension process) background page, , 1 page can dom window of other. popup gets background page calling chrome.extension.getbackgroundpage()
. every time open popup, read , write variable on background page, example chrome.extension.getbackgroundpage().entereddata = "value";
.
alternately, can use html5 localstorage store variables after browser shut down; e.g. localstorage['entereddata'] = "value"
.
Comments
Post a Comment