Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#116 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
frontend, web-dev

Direzione di ricerca

Riproduci il comportamento con il gist RequireBin collegato e ispeziona iframe/index.js intorno all’assegnazione di source indicata, insieme alla dipendenza browser-module-sandbox. Confronta l’approccio Blob URL con il comportamento srcdoc segnalato nella scheda Network di Chrome DevTools. Il lavoro è completato quando i tag link e script dell’head HTML vengono elaborati come previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
JavaScript
Stelle
389
Fork
73
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di max-mapper/requirebin

Tutte le issue di max-mapper/requirebin

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.