Comments (2)
Real world example: text editor in https://collabuml.com.
from pico.
I tried to use Pico and ran into that issue (our whole app is running inside an iframe during development for some... valid reasons). So using Pico would only screenshot all the devtools we have around the iframe and not the app itself inside it.
I wanted to only screenshot the iframe itself next, since that's what I actually care about, doing something like:
pico.objectURL(document.querySelector("#myIframe").contentWindow).then(url => {})
But this crashed due to getWindowInfo
checking the instanceof
compared to the global ones. Can be solved by doing:
if (!($html instanceof $window.HTMLHtmlElement)) {
return left(err('Failed to get HTMLHtmlElement'))
}
if (!($body instanceof $window.HTMLBodyElement)) {
return left(err('Failed to get HTMLBodyElement'))
}
(there is a Typescript error but that's actually valid)
This will now screenshot the content of the iframe but without the correct rendering. Seems like most CSS (if not all) is missing.
That's how far I could go :-)
from pico.
Related Issues (16)
- Proxy failed CORS requests HOT 2
- Inline `url()`'s in `style` attributes
- Option to ignore cloning certain nodes HOT 1
- Support running animations
- Subresource placeholders
- Copy current `<video>` frame HOT 1
- Only download used font files
- Capture svg with href - link to a resource
- Example on codesandbox.io or similar HOT 5
- Capture cursor position HOT 1
- New Feature: Please Provide Real World Example Usage HOT 1
- Some webfonts not working (only firefox) HOT 1
- Dependency future.js throwing an error
- Gripeless has been discontinued. HOT 2
- Safari support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.