flagon-useralejs icon indicating copy to clipboard operation
flagon-useralejs copied to clipboard

onhighlighted

Open Jyyjy opened this issue 1 year ago • 2 comments

The only event from the tabs API that is not instrumented is onhighlighted. It is challenging to add at the moment because the event potentially applies to more than one tab.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/Tabs/onHighlighted

Jyyjy avatar Mar 16 '24 23:03 Jyyjy

So @Jyyjy can you elaborate the actual issue ?

Suvendu-UI avatar Jul 20 '24 04:07 Suvendu-UI

https://github.com/apache/flagon-useralejs/blob/ee2389f357d2369c5a46d4e07d1b267a03e435b4/src/UserALEWebExtension/background.ts#L230

In background.ts, almost all events from the js tabs API are captured and logged. Except onhighlighted because onhighlighted is an event that happens to a list of tabs. Meanwhile other tab events only happen to a single tab.

The problem is that the functions expect an event to happen to a single tab. The two approaches to resolve it are to either create separate logs for each highlighted tab. Or put the information of all the tabs into a single log.

Jyyjy avatar Jul 24 '24 19:07 Jyyjy