Background script works but not background window

Hi,

I’ve switched manifest.json from using a background script to a background window. The window, or the scripts included by it, is not loading. I know this because there is console output in some of the scripts which does not display when using the background window. However, the output displays when I use background scripts. What am I doing wrong?

manifest.json (old): (works fine)

"background": {
    "scripts": [
        "scripts/utils.js",
        "scripts/const.js",
        "scripts/storage.js",
        "scripts/log-entries.js",
        "scripts/background.js"
    ]
}

manifest.json (new): (JS files or window not being used)

"background": {
    "page": "background.html"
}

background.html: (JS files or window not being used)

<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
	</head>
<body>
	<script src="scripts/utils.js">
	<script src="scripts/const.js">
	<script src="scripts/storage.js">
	<script src="scripts/log-entries.js">
	<script src="scripts/background.js">
</body>
</html>

Thank you,
Eric Jung

That is strange. I’d say it should work. Here are two ideas:

  • load the extension in Chrome. The script loading behavior should be the same, but maybe Chrome gives you better error messages (extension script loading is shown in Chromes network tab).
  • revert to the "scripts" array, copy the auto-generated HTML and start with that as a "page".

The problem is the script tags aren’t closed.

Pretty obvious, now that you say it ^^