Open AdriVanHoudt opened 9 years ago
Inserting Theseus first is the easiest, most fool-proof way to do it programmatically.
Does it cause problems for Polymer, or does it just trigger a warning?
I guessed so and it triggers the warning and causes problems. Some elements stop working.
Could you give me an example, or will it be obvious if I open a Polymer example project?
It is pretty obvious. With Polymer you include platform.js
and it should be the first javascript in the head tag. Like this:
<html>
<head>
<script src="/bower_components/platform/platform.js"></script>
...
</head>
...
</html>
With Theseus on it looks like
<html>
<head>
<script>theseus stuff here</script>
<script src="/bower_components/platform/platform.js"></script>
</head>
...
</html>
If you look at the Sources tab of Chrome dev tools it displays the Theseus script tag even before the html tag. Also I found that, at least in my version of chrome, it doesn't give the error stated above but it will just give the errors caused by it.
Since Theseus inserts javascript as first script on the page it breaks the
platform.js
from Polymer. See"platform.js is not the first script on the page. See http://www.polymer-project.org/docs/start/platform.html#setup for details."
I assume Theseus also requires to be the first script otherwise it would be nice to no insert it first or make it optional or something.