<script> & <link> tags are ignored (possible solution included)
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
调研方向
使用链接的 RequireBin gist 重现该行为,并检查 iframe/index.js 中所引用的 source 赋值附近的代码,以及 browser-module-sandbox 依赖项。将 Blob URL 方案与 Chrome DevTools 的 Network 标签页中报告的 srcdoc 行为进行比较。当 HTML head 中的 link 和 script 标签按预期处理时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Working with this gist: http://requirebin.com/?gist=01274d1e3cd82fa3d12cdb6466f42106
First off, this is an awesome tool! Thank you for giving me such a great head start on my own project.
I was fooling around locally with the project, specifically the <head> area of the app and attempted to place a <link> and a <script> tag in it. I was expecting the <link> tag (pointing to a Google Font) to work, and expecting the <script> tag to fail since there is no "some-library.js" on requirebin's servers.
Instead, I saw no attempt to download those assets from within Chrome (51) DevTool's Network tab. It was like the tags were being ignored completely.
After some searching, I found that I was able to get it to work by adjusting iframe's source code (project is depended on from requirebin and browser-module-sandbox), changing:
tempIframe.src = targetUrl
to
tempIframe.srcdoc = opts.html
It seems that Chrome didn't like the created Blob URL. Using srcdoc instead seemed to work. I doubt this is a very clever solution, and welcome any comments to this issue.
Mind you, I intend to fork this project to suit my own needs, so I'm not sure if this is even an appropriate issue to report. But I figured I'd raise it in case anyone else experienced similar issues.
Thanks!
Tim
- 主要语言
- JavaScript
- 星标
- 389
- 派生
- 73
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
max-mapper/requirebin 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 25/100
max-mapper/requirebin#132 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
max-mapper/requirebin#130 ·
-
HTTPS support未关闭
难度 4/5 3-5 天 新手友好度 25/100
max-mapper/requirebin#128 · 1 条评论 · 3 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 25/100
max-mapper/requirebin#125 · 1 条评论 · 1 个 reaction ·
-
难度 1/5 1 小时以内 新手友好度 20/100
max-mapper/requirebin#123 ·
查看 max-mapper/requirebin 的全部 Issue
相似的 Issue
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
status: waiting triage
难度 2/5 1-3 小时 新手友好度 84/100
freeCodeCamp/freeCodeCamp#70412 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
rohitg00/ai-engineering-from-scratch#490 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 6 天内回复