I am developing a chrome extension. I have a requiremen that is create a new tab with some params like javascript 'window' function.
By default javascript window function, i need to set this code as below then window.location.replace
allow permission to access the page in new window.
window.name = JSON.stringify({
id : 'tmp',
companyCode : companyCode,
locationCode : locationCode,
terminalNo : terminalNo,
terminalKey : terminalKey,
server:{
protocol : protocol,
remoteHost : remoteHost,
remotePort : remotePort,
clientHost : clientHost,
localPort : clientPort,
webContext : null,
gcRemoteHost : remoteHost,
gcRemotePort : remotePort,
soaPort: 9091,
webSocketPort : 9099,
}
});
Now, I am using the google chrome api to create tab.
chrome.tabs.create({
url: new_location
});
So, I have a question, How should I pass above window.name
to create a new tab that I can access the new location.