While migrating tests from app-router to Polymer 1.0, I've noticed that it is not possible to define an element and use this element in the main document.
The following simple example fails under Firefox and Internet Explorer, because 'Polymer' is not defined :
<!DOCTYPE html>
<html>
<head>
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
<title>Polymer Tests</title>
</head>
<body>
<dom-module id="x-element">
<template>
Test element.
</template>
<script>
Polymer({
is: 'x-element'
});
</script>
</dom-module>
<x-element></x-element>
</body>
</html>
It works with Chrome though.
Test page is also available here http://plequang.github.io/polymer-tests/
I thought it was a HTMLImport polyfill problem, but the same example with Polymer 0.5 and webcomponentjs 0.7.3 is working correctly.
Is this a bug, or is this way of defining elements prohibited with Polymer 1.0 (meaning you should always define elements in other files than the main document) ?
Thanks
While migrating tests from app-router to Polymer 1.0, I've noticed that it is not possible to define an element and use this element in the main document.
The following simple example fails under Firefox and Internet Explorer, because 'Polymer' is not defined :
It works with Chrome though.
Test page is also available here http://plequang.github.io/polymer-tests/
I thought it was a HTMLImport polyfill problem, but the same example with Polymer 0.5 and webcomponentjs 0.7.3 is working correctly.
Is this a bug, or is this way of defining elements prohibited with Polymer 1.0 (meaning you should always define elements in other files than the main document) ?
Thanks