Bonjour
Mon premier test de polymer.js et je rencontre un bogue que je ne comprends pas.
Firefox : Error: Permission denied to access property 'polymerWrapper_' platform.js:29
Fichier tk-element.html :
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <polymer-element name="tk-element"> <template> <p>This is <strong>{{owner}}</strong>'s tk-element.</p> <p>{{owner}} likes the color <span style="color: {{color}}">{{color}}</span></p> <p>I am <strong>{{age}}</strong> years old.</p> <fieldset> <label for="ageInput">Age:</label> <input id="ageInput" type="range" min="0" max="120" value="{{age}}"> <label for="nameInput">Name:</label> <input id="nameInput" value="{{name}}" placeholder="Your name here..."> </fieldset> </template> <script> Polymer( 'tk-element', { "age" : 25, "name" : "Daniel", "color" : "red", "owner" : "Eric", "nameChanged" : function() { if (this.name) { // ensure capitalization this.name = this.name[0].toUpperCase() + this.name.slice(1); } }, "ready" : function(){ //console.log( this.$ ); } }); </script> </polymer-element>
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 <!DOCTYPE html> <html lang="fr" dir="ltr"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0"> <meta name="author" content="Daniel Hagnoul"> <title>Polymer</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.1.4/platform.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.1.4/polymer.js"></script> <link rel="import" href="tk-element.html"> <style> </style> </head> <body> <section> <tk-element></tk-element> </section> <footer class="h-entry"> <time class="dt-published" datetime="2014-01-22T10:36:43.443+0100">2014-01-22T10:36:43.443+0100</time> <a class="p-author h-card" href="http://www.developpez.net/forums/u285162/danielhagnoul/">Daniel Hagnoul</a> <a class="u-url" href="http://danielhagnoul.developpez.com/">Mon cahier dexercices</a> <a class="u-url" href="http://javascript.developpez.com/faq/jquery/">FAQ</a> <a class="u-url" href="http://javascript.developpez.com/cours/?page=frameworks#jquery">Tutoriels</a> </footer> </body> </html>
Partager