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

Injecting contents into iframe documents #83

Open
JayPanoz opened this issue Nov 6, 2024 · 1 comment
Open

Injecting contents into iframe documents #83

JayPanoz opened this issue Nov 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@JayPanoz
Copy link
Contributor

JayPanoz commented Nov 6, 2024

There is currently no “Injection API” allowing developers to inject content into iframes so they may rely on accessing the navigator’s frames directly at the moment, which may cause issues further down the line.

There were talks in the past in Architecture for reference.

This issue will help document use cases and list possible side-effects.

A first use-case can be found in Playground, with prev/next buttons being added into iframes in the scrollable layout. See the dedicated issue.

Page of Moby Dick in scrollable layout, with previous and next buttons at the bottom of the page

The doc in architecture is also illustrated using MathML (injecting a script) and CSS (injecting stylesheets).

@JayPanoz JayPanoz added the enhancement New feature or request label Nov 6, 2024
@JayPanoz JayPanoz moved this from Draft to Icebox in Readium Playground Nov 25, 2024
@JayPanoz
Copy link
Contributor Author

Recap from the last Web Engineering call.

  • could be injected as a blob;
  • when injecting elements into the iframe, there is no guarantee it will work for all publications;
  • they inherit publication styles through the cascade, but may also be impacted by scripts, etc.
  • Mobile toolkits have an issue where it’s not trivial to add something above and below the iframe, if we want to have something that works for them, it would probably be better to add some space and display these elements on top of the iframe, not directly inside it.
  • That would also help with the scoping issues aforementioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Icebox
Development

No branches or pull requests

1 participant