Is there a way to fully view 'every' URL to be loaded in a new tab, right after the tab is created?

The target URL can be viewed through webNavigation.onCreatedNavigationTarget, but that event seems to only fire for tabs created through links on a web page. In tabs.OnCreated, the URL for non discarded tabs is usually “about:blank” as the URL has not been given its final value yet. Some URLs don’t seem to trigger any events after tabs.onCreated, like some that launch programs or certain invalid URLs. Here are some examples:

irc://moznet
mailto://nobody@google.com
file://google.com
wss://echo.websocket.org
chrome://google.com
moz-extension://google.com

A tabs.query will return “about:blank” for URLs of the above tabs. Is there any other way to view these URLs in a background script?

I faced the same situation. Furthermore, restoring the previous session doesn’t trigger browser.tabs.onCreated() but onUpdated() instead. What you can do is to listen to both onCreated() and onUpdated(), then call browser.tabs.query() if necessary.