You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
Relative Paths — Are all paths relative to required resources (images, etc.) relative to the component source?
A web component should appear self sufficient as far as the user is concerned. If resources are required, they should be packaged with the component. The distribution and packaging standards should be a matter of their own
As with the other guidelines in the Loading section, this guideline is admittedly challenging to define. It's a critical issue — I've seen numerous web components that made assumptions about where they were located in the source tree, and were effectively unusable outside a project that wasn't organized exactly like the component's original project. And yet none of the Loading criteria can be defined with reference to HTML elements — the native ones are built-in, so they don't have any loading issues.
This particular issue has actually gotten worse since it was first written. Web components originally could depend upon HTML Imports. Since those have died, we're left with a world in which there's no standard means for a bit of source code to load a required resource from a relative location.
I'm debating whether to remove this guideline for the time being, or reword it.
The text was updated successfully, but these errors were encountered:
This cannot be a strict rule indeed since there are no clear web standards in place and there likely won't be any in the foreseeable future. The only thing that we can currently do while building web components is assuming that external dependencies are in a sibling folder i.e. ../
I would then remove it altogether or put it in an "Extra" section
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Breaking out this feedback from @arkihillel in #10:
As with the other guidelines in the Loading section, this guideline is admittedly challenging to define. It's a critical issue — I've seen numerous web components that made assumptions about where they were located in the source tree, and were effectively unusable outside a project that wasn't organized exactly like the component's original project. And yet none of the Loading criteria can be defined with reference to HTML elements — the native ones are built-in, so they don't have any loading issues.
This particular issue has actually gotten worse since it was first written. Web components originally could depend upon HTML Imports. Since those have died, we're left with a world in which there's no standard means for a bit of source code to load a required resource from a relative location.
I'm debating whether to remove this guideline for the time being, or reword it.
The text was updated successfully, but these errors were encountered: