Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

<script> & <link> tags are ignored (possible solution included)

オープン
#116 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
frontend, web-dev

調査の方向性

リンクされた RequireBin gist で動作を再現し、参照されている source の代入箇所付近の iframe/index.js と、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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

max-mapper/requirebin のほかの issue

max-mapper/requirebin の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。