-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Cannot open demo in <iframe>
#394
Comments
@levchak0910 Thanks for the report. But I am afraid that I cannot reproduce the error. The demo seems to work correctly: I am using Firefox 123.0 on macOS Sonoma 14.3.1. |
@ybiquitous have you tried to open it in an iframe? <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTLLO</title>
</head>
<body>
<iframe src="https://stylelint.io/demo/#N4Igxg9gJgpiBcIA8AXGBbADgGwIZoD4AdAOyJQGcJ0ZSkB6NLPQ0uilAT2xmJNwAEwNigDmAJwCWUALRMc+GDNziYuCvBHkA5INzatKbQCMBp49oDcIyNnHwBACwp4AFACYADABoBARk8AUl8AZiDfAFZAgEprEgBfNn4hERkZADEICAc-VXQ4xLIihg5uXhBvEAAzSR4AOVwaBBAYAA9GnBgAOgA3AFc4SsgSGtFm4RIBASIW1rQSKAoZhwBtUimpmdKebEkSFBlh0ZkOXAWVKBnvdY2trh29g6PJURlVSHQaBZhZftoQG4AXVI8Qq4AgIxemXE6HwzQAVlQSGDYJgKOMbncyrt9stpiAWDAOFdMSBtjAcU8IcdTudxJcEPjCcSKqTMBAOGAKBQZI4UOhsHiZsyUCTJvjyZTDtSXm8YB8vrBfgMhQTFCyQSB4kA" frameborder="0"></iframe>
</body>
</html> |
Ah, I see. I am not sure about details, but opening the demo site in stylelint.io/src/pages/demo.js Line 23 in 3478636
|
Honestly, I don't think we need to support this way, right? |
I would like to share my case. I wanted to show the stylelint capabilities in the iframe, in a presentation I am preparing for the conference. So, I decided to check how your demo is implemented. It looks quite complicated to repeat in my presentation, so I decided to show via an iframe, but infinite reload doesn't let me do it. If your team don't want to support it - that is totally fine, you can close the issue. I still can exit a presentation and navigate to the /demo page by a link. |
I understand your background. Our demo is implemented by WebContainers of StackBlitz (see also stylelint/stylelint-demo#351), so please take a look at the doc. @ota-meshi Do you have any thoughts about this issue? If nothing in particular, I will close this issue. |
Cross-origin isolation is required for the demo to work. Stylelint site does several things to make it work. Lines 6 to 9 in 3478636
stylelint.io/src/pages/demo.js Line 43 in 3478636
stylelint.io/src/pages/demo.js Line 13 in 3478636
See also https://github.com/stylelint/stylelint.io/pull/306/files |
@ota-meshi Thanks for sharing the info about cross-origin stuff. @levchak0910 Please try the advice in your app. I hope you're doing well in your presentation. |
@ybiquitous @ota-meshi thank you both for info and support ) |
What steps are needed to reproduce the bug?
link with code:
https://stylelint.io/demo/#N4Igxg9gJgpiBcIA8AXGBbADgGwIZoD4AdAOyJQGcJ0ZSkB6NLPQ0uilAT2xmJNwAEwNigDmAJwCWUALRMc+GDNziYuCvBHkA5INzatKbQCMBp49oDcIyNnHwBACwp4AFACYADABoBARk8AUl8AZiDfAFZAgEprEgBfNn4hERkZADEICAc-VXQ4xLIihg5uXhBvEAAzSR4AOVwaBBAYAA9GnBgAOgA3AFc4SsgSGtFm4RIBASIW1rQSKAoZhwBtUimpmdKebEkSFBlh0ZkOXAWVKBnvdY2trh29g6PJURlVSHQaBZhZftoQG4AXVI8Qq4AgIxemXE6HwzQAVlQSGDYJgKOMbncyrt9stpiAWDAOFdMSBtjAcU8IcdTudxJcEPjCcSKqTMBAOGAKBQZI4UOhsHiZsyUCTJvjyZTDtSXm8YB8vrBfgMhQTFCyQSB4kA
open as
<iframe src="[link above]">
What did you expect to happen?
I wanted to work with playground via iframe
What actually happened?
I am not sure if my actions caused the site to break, but I want to report what happened.
I tried to open stylelint.io/demo with code (via
/#hash
) in an iframe, but for some reason, it started to reload infinitely until the site went down. I suppose I made a small unconscious DoS attack (my laptop was working pretty hard)Date and time: 25 Feb 2024 around 02:10 CET
The text was updated successfully, but these errors were encountered: