If it has to run in a separate app, then that app must embed its own separate browser than the one popping up the pie menus.
Since it's a lot easier on the Mac to embed a Safari browser than a Chrome browser, it might be amusing to have Safari handling the pop-up pie menus of Chrome, but it wouldn't be the optimal solution of Chrome (or Safari or Firefox) drawing its own pie menus.
Chrome's browser window extension api almost but not quite works for my purposes, and I wonder if or why it was a design decision not to make it more flexible. Security? Browser extensions, like clowns, can already get away with murder.
Eh, I'm pretty sure it's quite a bit easier and faster to draw a radial menu with proper drawing primitives, like in Hammerspoon's API. Gotta admit I have no idea why you'd want animated pics or videos in such a menu. Though Hammerspoon's docs say that the drawing API does ‘support’ GIFs in some way, dunno exactly how.
As a bonus, you could then invoke those menus in apps other than the browser, though you'd need some access to the UI, like AppleScript or accessibility APIs—which are typically neglected in cross-platform UIs.
It was quite clear to me in 1997 that I did not want to play catch-up to the web browser by programming an ActiveX OLE Control pie menu using the Win32 API and GDI to draw as nicely and as flexibly as web browsers could draw using HTML, CSS, VML/SVG/Canvas, etc. It's easier and faster to not reimplement (and maintain) the wheel.
And who are you or I to say that the people designing pie menus don't want to use animated gifs, mpeg videos, Canvas, WegGL, or provide rich application specific real time visual feedback and animation during tracking, or do anything else in their menus that html is capable of?
If you can't come up with a use case for menus with animated gifs, it's just a failure of imagination, not proof that menus with animated gifs are a bad idea. A web app should be able to easily use its very own web content in the exact same format to illustrate its menu items.
In fact, I actually wanted to use animated gifs as pie menu items myself, and the demo video I linked to of my first Dynamic HTML implementation of pie menus shows animated gifs and html tables in the "Punkemon" pie menus, for example (at 3:00).
https://www.youtube.com/watch?v=R5k4gJK-aWw&ab_channel=DonHo...
(Sorry the graphics design and layout are atrocious, but I implemented that two decades ago, and the whole point was to piggyback on the next 20 of web development, not try to reimplement it all by hand.)
Notice how (at 6:50) I use an XSL spreadsheet to transform the XML database of Punkemon characters into a set of illustrated pie menus rendered with html, tables, and animated gifs.
In 2001, the web browser already has an XSL stylesheet processing engine built in, which you can use for dynamically rendering richly formatted pie menus from XML data, and it fully supports animated gifs, tables, and all html and css features out of the box. Does Hammerspoon?
That's exactly what I mean about being able easily to use your native web content and technologies in menus.
JavaScript pie menus (implemented circa 2001 for Internet Explorer with Dynamic HTML Behavior Components):
https://donhopkins.com/home/PieMenu/piemenu.htc
https://donhopkins.com/home/PieMenu/punkemon.xml
https://donhopkins.com/home/PieMenu/punkemon.xsl
https://donhopkins.com/home/PieMenu/JavaScriptPieMenus.html
>Pie Menus are specified in XML.
>Standard, simple syntax for describing arbitrarily nested trees of pie menus. The syntax of XML pie menus is very obvious and easy to read, learn, modify and create.
>Pie Menus are configured with reasonable defaults, so the XML menu descriptions are concise. And designers can easily override the defaults, and customize the properties, behavior and visual appearance of any pie menu, item or submenu.
>XML Pie Menus can be automatically generated and used by many XML tools and applications, including XSL style sheets, web servers, databases and XML editors.
>The Punkemon Pie Menus example shows how to use an XSL style sheet (punkemon.xsl) to automatically transform an XML database (view source of punkemon.xml) into a web page with nested pie menus (Punkemon Pie Menus).
>Pie menus are easy to configure and customize in many ways.
>Pie menus have default attributes that can be easily overridden and specified for a whole menu or any individual item.
>Pie Menus are rendered using Dynamic HTML.
>Arbitrary Dynamic HTML can be embeded in XML Pie Menu specifications, to define the appearance of the pie menu center and items. Anything you can describe in DHTML can be used to make pie menus.
>Pie menus support arbitrarily shaped images in the pie menu center and items, as well as dynamic control over the background appearance, highlighting and transparency effects.
>Pie menu callbacks can dynamically alter the content and appearance of the pie menu center, items and web page in response to user input. The Style Pie Menus demo shows how the pie menu callbacks can dynamically modify the properties of the text on the web page, to provide immediate and intuitive feedback.
>Pie menus can be easily integrated with ActiveX, DirectAnimation, JPEG, animated GIF, PNG, MPEG, QuickTime, Flash, Java, and many other technologies supported by Internet Explorer. The Direct Animation demo shows how you can easily integrate pie menus and interactive structured graphics created with Direct Animation.
>The Punkemon Pie Menus demo shows how pie menus can incorporate animated GIF images and dynamic HTML effects like scaling, as well as large pie menu items containing HTML tables and formatted text. [...]
>Dynamic HTML is a flexible, well known, widely supported and graphically expressive markup language, used by pie menus to define their visual appearance and interactive behavior. Pie menus support the XML-based XHTML standard, which is the new XML compliant version of Dynamic HTML, because it cleanly nests inside of XML pie menu specifications, and is easily generated by XSL style sheets and other XML processing software.
>The pie menu component supports a full set of callback events, so JavaScript of VBScript code on the web page can dynamically track pie menu browsing and selection, to implement selection handlers and rich interactive application specific feedback.