Shiou-Ju / kbbi-selection-enhancer-chrome

Simplify working flow learning Indonesian using https://kbbi.co.id/
MIT License
0 stars 0 forks source link

Possible workaround for `navigator clip write` approach in the future #8

Closed Shiou-Ju closed 9 months ago

Shiou-Ju commented 9 months ago

Issue Summary

Encountering difficulties with automated testing of clipboard interactions using navigator.clipboard.writeText in our extension.

Proposed Change

To ensure reliable testing and compatibility with our testing framework, we propose to modify both the implementation and the tests. Instead of relying on the clipboard API, we will store the text in a hidden page element and use selection and execCommand for copying.

Expected Benefits

Ensures greater reliability and consistency in automated tests.

Feature #1

Shiou-Ju commented 9 months ago

https://github.com/Shiou-Ju/kbbi-selection-enhancer-chrome/pull/10 already implement this.