github / github/text-expander-element

`provide` function unavailable in Firefox content scripts context

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
228
Forks
32
Avg merge
1d 6h
Merged PRs (30d)
5

Description

Our team is trying to write a browser extension to create an autocomplete search feature inside Github for a 3rd party issue tracking system.

We almost have it working on Chrome, but on Firefox the [content security limitations of content scripts](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts#xray_vision_in_firefox) is preventing us from making this work.

The issue is that the [`provide`](https://github.com/github/text-expander-element/blob/main/src/text-expander-element.ts#L250-L252) function sent in the detail object of the `text-expander-change` `CustomEvent` is not accessible inside the Firefox content script.

We would appreciate any refactor that would allow us to use this component without any passthrough functions or DOM fragments.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.