Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

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

  • 2 отговора
  • 1 има този проблем
  • 1 изглед
  • Последен отговор от 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>

Всички отговори (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