Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 拡張機能のオーバレイを iframe に入れ込む #138

Open
itsu-dev opened this issue Jul 7, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request priority:low

Comments

@itsu-dev
Copy link
Collaborator

itsu-dev commented Jul 7, 2023

概要

現状は #resta-root として拡張機能の GUI となる要素を既存 Web ページの body 要素の最後に追加するような実装になっているが、これでは以下のような問題がある。

  • 既存 Web ページの CSS が ReSta 画面側にも適用されてしまうため、意図しないスタイルの崩れが発生する可能性がある
  • 要素選択で意図しない要素が選択される問題が発生しうる
  • 既存 Web ページに ant-design が使用されていた場合、要素が選択できなくなる可能性がある

懸念点

  • Cross-Origin 制約により外側のコンテンツにアクセスできない可能性
    • 今回の場合拡張機能による iframe インジェクションであり、同一オリジンが保証されるためこの問題については解決できると見込まれる
  • iframe による既存サイトと ReSta 側の通信
  • Chrome 側のボタンを押下した際のイベントを捕捉できるかどうか
  • 既存コードベースの大幅な変更が見込まれるため、コンフリクトを最小限に抑えたい

目的

ReSta の動作安定化

提案内容

現状 div で実装されている #resta-root を iframe に置き換え、既存コードベースの要素選択部分などのコードを修正する。

参考

@itsu-dev itsu-dev added the enhancement New feature or request label Jul 7, 2023
@itsu-dev itsu-dev self-assigned this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:low
Projects
None yet
Development

No branches or pull requests

1 participant