Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

[Feature request] Add <library> tag, similar in purpose to <script> tag

  • 2 risposte
  • 1 ha questo problema
  • 1 visualizzazione
  • Ultima risposta di vlisivka

more options

As developer, I need <library> tag for my products, which will allow me to implement future-proof solutions for my clients.

Currently, I need to bundle libraries with application, to be independent from third-party sites, so browser needs to download/parse/compile them again and again for each site. What I need is a tag, which will allows me to offload library loading to browser, so browser will be able to download library and compile and optimize it ahead of time. Moreover, if bug-fix for library is released, browser can use bug-free version of library. Moreover, developers can release browser-specific versions of same library, e.g. optimized for specific kind of Firefox or specific version of Firefox.

Proposed syntax is: <library name="LIBRARY_NAME" version="LIBRARY_VERSION"><script src="https://.../library.js"></script></library> , where LIBRARY_NAME is well-known name of the library, as registered at CDN, e.g. "react", and LIBRARY_VERSION is version of library in SEMVER format , with optional "^" to indicate that upgrade to next minor version is allowed, when it is released, e.g. "^5" (5.0, 5.1, 5.2, ...) , or "^5.0" (5.0.1, 5.0.2, ...), or "5.0.3" (5.0.3-1, 5.0.3-2, ...).

Example:

<library name="react" version="^15.0"><script src="https://mysite/js/vendor/react-15.0.1.js"></script></library>

As developer, I need <library> tag for my products, which will allow me to implement future-proof solutions for my clients. Currently, I need to bundle libraries with application, to be independent from third-party sites, so browser needs to download/parse/compile them again and again for each site. What I need is a tag, which will allows me to offload library loading to browser, so browser will be able to download library and compile and optimize it ahead of time. Moreover, if bug-fix for library is released, browser can use bug-free version of library. Moreover, developers can release browser-specific versions of same library, e.g. optimized for specific kind of Firefox or specific version of Firefox. Proposed syntax is: <library name="LIBRARY_NAME" version="LIBRARY_VERSION"><script src="https://.../library.js"></script></library> , where LIBRARY_NAME is well-known name of the library, as registered at CDN, e.g. "react", and LIBRARY_VERSION is version of library in SEMVER format , with optional "^" to indicate that upgrade to next minor version is allowed, when it is released, e.g. "^5" (5.0, 5.1, 5.2, ...) , or "^5.0" (5.0.1, 5.0.2, ...), or "5.0.3" (5.0.3-1, 5.0.3-2, ...). Example: <library name="react" version="^15.0"><script src="https://mysite/js/vendor/react-15.0.1.js"></script></library>

Tutte le risposte (2)

more options

This probably needs to be standardized first before it is going to be added to Firefox. The HTML5 standard is mostly discussed/developed by these folks:

https://whatwg.org/

The HTML page at https://html.spec.whatwg.org/multipage/ has links for a mailing list and links to read and submit issues on Github.

more options