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

feat: add allowPopups option #1249

Merged
merged 1 commit into from
Feb 15, 2022
Merged

feat: add allowPopups option #1249

merged 1 commit into from
Feb 15, 2022

Conversation

azu
Copy link
Contributor

@azu azu commented Feb 5, 2022

This PR aim to add allowPopups option(disabled by default).

sandbox attribute was introduces in #1222
sandbox apply allow list model. So, if any sandbox attributes exists, disable default features like allow-popups.

Currently, we can not open external link from epub content.

For example, Click the link like<a href="https://example.com" target="_blank">link</a> and throw an error

Blocked opening 'https://example.com' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

The allowPopups allow user open the link.

Test Plan

  1. Open http://localhost:8080/examples/input.html
  2. Load epub content that include external link
  3. Click the link in the cotent

@fchasen
Copy link
Contributor

fchasen commented Feb 15, 2022

Thanks, this looks great.

I'm thinking in the future we should handle all the links from the Rendition (currently only internal links work that way) but this option should still be useful.

@fchasen fchasen merged commit 585bce1 into futurepress:master Feb 15, 2022
@azu azu deleted the allow-popups branch February 16, 2022 04:50
@azu
Copy link
Contributor Author

azu commented Feb 16, 2022

Thanks to merge!
0963efe

Is 0.3.93 published into npm?

❯ npm info epubjs

epubjs@0.3.92 | BSD-2-Clause | deps: 9 | versions: 107

@fchasen
Copy link
Contributor

fchasen commented Feb 17, 2022

Had an issue with 2 factor auth, published now!

@azu
Copy link
Contributor Author

azu commented Feb 17, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants