Creating custom about:URLs with WebExtensions

Is there an API to create these custom pages yet? I don’t see one, but maybe there’s a different method.

I don’t think there is one yet. But maybe someone more verse in the WEAPI can reply.

But are you familiar with the regular method?

https://developer.mozilla.org/en-US/docs/Custom_about:_URLs

https://github.com/Noitidart/NativeShot/blob/master/bootstrap.js#L437-L485

That article needs updating because of bug 1254752, and so does your code. :wink:

https://bugzilla.mozilla.org/show_bug.cgi?id=1254752

@noitidart I’m familiar with the standard (SDK) method since I am using with with my current extension. I started looking at converting it to a WebExtension that’s why I’m asking, It looks like the current method may be completely incompatible.

I have yet to try loading the current JS as a background script, but I doubt that will work.

Thanks updated the docs and now to update my code haha

(Sorry for going off-topic again as this is not really WebExtensions) Pro-tip: bug 1215793 is also relevant for e10s (esp. comment 7), the about: handler needs to be registered in the child process as well, otherwise web navigation won’t work.

https://bugzilla.mozilla.org/show_bug.cgi?id=1215793

1 Like

Thanks bro! I really needed that. I had that mind boggling issue and gave up on the URI_MUST_LOAD_IN_CHILD flag and switched to URI_CAN_LOAD_IN_CHILD flag. Didn’t know it was a real bug.