Closed spier closed 3 years ago
That's because of the HTML templates which are stored in the HTML page directly. The browser parses them and tries to resolve the src with a template variable. An alternative to avoid this would be to not set the "src" attribute and set it while filling the template or to load the templates from a separate file to avoid the initial parsing.
Got it.
We spoke about the home-grown minimalistic templating system used in this project in a separate thread. Was that a conscious design decision i.e. did you want to keep this project free of a 3rd party templating system on purpose?
I am asking because when reading the source, I found that part a bit hard to understand in index.html
and index.js
.
And sorry if this conversation might be somewhat out of context for this issue, but it is related to the templating approach in general at least :)
Yes, i was testing out plain VanillaJS without any thirdparty for this project - feel free to suggest or introduce a templating system though if it makes maintenance of the project easier
I am not an expert on this either. A very slim templating system would be nice though. Not urgent for sure.
I experimented a bit with Handlebars and found this implementation a lot better than the custom templating, thx for the hint
Kind of cool that that also fixed this issue as a side effect :)
When checking the logs of the browser console, I noticed one error that gets reported there:
There are many more placeholder values in
index.html
that are similar to[[mediaURL]]
. However somehow only this instance in line 104 is causing an error.You can also confirm this in the demo project.