I’m likely overlooking something obvious but am having trouble getting my content script to work in the web page.
I experimented some time ago adding content to empty HTML containers stored locally; and it all worked fine. The content scripts requested HTML content from the background script, and CSS was inserted and a script added through tabs.executeScript. Then, knowing that it could be done, I focused on building out that content.
Now that my HTML and scripts are more complex something isn’t working. The first container works fine, and through user action in that page a second container is opened in a new tab and more complex content is added to it.
The HTML and CSS load but I get a cross-origin object error of
Error: Not allowed to define cross-origin object as property on [Object] or [Array] XrayWrapper. And it is at a line of JS code that assigns an array to an object property held in RAM.
There is no page script and the content script is not using any special APIs. I’m not attempting to use anything related to XrayWrapper.
The script fails after initializing some variables, opening an existing database, and populating that page with that stored data of last state. A portion of that data is held in RAM and it seems to fail at the first attempt at modifying that data.
Would you please let me know what I am missing?