-
Notifications
You must be signed in to change notification settings - Fork 63
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
CLI doesn't capture Web Components #58
Comments
Generally speaking, SingleFile CLI should support web components. For example, it can save https://bugs.chromium.org/p/chromium/issues/detail?id=1040752 which has hundreds of them almost properly. The only issue is related to the fact that a Do I need an account on SalesForce to do your test? I cannot reproduce the procedure you described because I get a login page when pasting the URL on step 3. |
Thanks for looking into that. I think this might be an issue specific to their web components then.
No, you don't need an account. Just click on the link from step 1) create new sandbox, wait a minute, and then click on "Launch" button: |
I think I identified the cause of the issue. Actually the Aura components overwrite properties like |
Is it possible to instruct puppeteer to read a native value of |
Actually the correct term is "isolated world". Unfortunately, I confirm this feature does not exist in puppeteer today, see puppeteer/puppeteer#2671. |
Thanks @gildas-lormeau. I found Page.createIsolatedWorld in CDP. I wonder if I could use that with puppeteer to fix the issue. From what I understand I would need to create this isolated world for a page and each frame within it. |
@tomaszferens Maybe, I did some tests but I was not able to make it work. If you want to do some tests easily in SingleFile CLI, you can apply the changes in the file https://github.com/gildas-lormeau/single-file-cli/blob/master/back-ends/puppeteer.js. |
The version 2.x is now using isolated worlds. |
When using the CLI to save a web page that contains Web Components (Salesforce's Lightning Web Components in this case) it produces invalid HTML file.
The issue is tied specifically to the CLI, because extension produces a correct HTML file.
To Reproduce
npm exec single-file "https://example.com" -- --browser-wait-delay=20000 --browser-headless=false
--browser-wait-delay
option).Extension result: extension-webcomponents.html.zip
Extension ✅ :
CLI ❌ :
The text was updated successfully, but these errors were encountered: