How to override browser page content with WebExtensions

It is possible to override default firefox pages with chrome.manifest.

For example:
override chrome://global/content/netError.xhtml chrome://offline/content/netError.xhtml

How can I do this with package.json or with Javascript API for WebExtensions addon?

For WebExtensions (ones that have manifest.json), it is not expected that this is directly possible. Limited wrapped APIs for modifying more parts of Firefox could be added, I think.

For SDK-based add-ons (with package.json), you can use chrome.manifest. It may not be recommended, however.

Is there no possibility to access this webpage netError.xhtml page?

For example I did this and run jpm run command;

pageWorker = require(“sdk/page-worker”).Page({
contentScript: “console.log(document.body.innerHTML);”,
contentURL: “chrome://global/content/netError.xhtml”
});

And the netError page content is printed in console.
PageWorker is in regular intervals printing this value and I am not able to modify the content.