documentUrlPatterns in browser.contextMenus.create not functioning as expected

This also applies to browser.menus.create.

Adding a url to documentUrlPatterns that has an explicit pathname, such as /some/page/ does not against document urls that should match.

Example 01:

browser.contextMenus.create({id: "12354", title: "Test01",documentUrlPatterns:["https://www.linkedin.com/feed/"]});

When using the above code, no context menu item is created for "https://www.linkedin.com/feed/". However, if I drop the trailing slash /, the menu item is created as expected.

If the page has no formed pathname, it's simply /, the context menu is created as expected. The following code will work as expected, note the pathname.

Example 02:

browser.contextMenus.create({id: "12354", title: "Test01",documentUrlPatterns:["https://www.apple.com/"]});

Example 01 works as expected in Firefox, but as mentioned does not work in Safari.

Is this purposeful or potentially a bug?

Specs:

Safari Version 14.1.1 (16611.2.7.1.4)

macOS Version 11.4 (20F71)

documentUrlPatterns in browser.contextMenus.create not functioning as expected
 
 
Q