OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <!-- | |
3 This file is autogenerated with polymer/tool/create_message_details_page.dart | |
4 --> | |
5 <html> | |
6 <style> | |
7 @font-face { | |
8 font-family: 'Montserrat'; | |
9 font-style: normal; | |
10 font-weight: 400; | |
11 src: url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/zhcz-
_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff) format('woff'); | |
12 } | |
13 @font-face { | |
14 font-family: 'Montserrat'; | |
15 font-style: normal; | |
16 font-weight: 700; | |
17 src: url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/IQHow
_FEYlDC4Gzy_m8fcnbFhgvWbfSbdVg11QabG8w.woff) format('woff'); | |
18 } | |
19 @font-face { | |
20 font-family: 'Roboto'; | |
21 font-style: normal; | |
22 font-weight: 300; | |
23 src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/Hgo13k-t
fSpn0qi1SFdUfbO3LdcAZYWl9Si6vvxL-qU.woff) format('woff'); | |
24 } | |
25 @font-face { | |
26 font-family: 'Roboto'; | |
27 font-style: normal; | |
28 font-weight: 400; | |
29 src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/CrYjSnGj
rRCn0pd9VQsnFOvvDin1pK8aKteLpeZ5c0A.woff) format('woff'); | |
30 } | |
31 | |
32 body { | |
33 width: 80vw; | |
34 margin: 20px; | |
35 font-family: Roboto, sans-serif; | |
36 background-color: #f0f0f0; | |
37 } | |
38 | |
39 h2 { | |
40 font-family: Montserrat, sans-serif; | |
41 box-sizing: border-box; | |
42 color: rgb(72, 72, 72); | |
43 display: block; | |
44 font-style: normal; | |
45 font-variant: normal; | |
46 font-weight: normal; | |
47 } | |
48 | |
49 div:target { | |
50 background-color: #fff; | |
51 border: 1px solid #888; | |
52 border-radius: 5px; | |
53 padding: 0px 10px 2px 10px; | |
54 box-shadow: 7px 7px 5px #888888; | |
55 margin-bottom: 15px; | |
56 } | |
57 | |
58 | |
59 h3 { | |
60 font-family: Montserrat, sans-serif; | |
61 box-sizing: border-box; | |
62 color: rgb(72, 72, 72); | |
63 display: block; | |
64 font-style: normal; | |
65 font-variant: normal; | |
66 font-weight: normal; | |
67 } | |
68 | |
69 div:target > h3 { | |
70 font-weight: bold; | |
71 } | |
72 | |
73 pre { | |
74 display: block; | |
75 padding: 9.5px; | |
76 margin: 0 0 10px; | |
77 color: #333; | |
78 word-break: break-all; | |
79 word-wrap: break-word; | |
80 background-color: #f5f5f5; | |
81 border: 1px solid #ccc; | |
82 border-radius: 4px; | |
83 } | |
84 | |
85 code { | |
86 font-family: Menlo,Monaco,Consolas,"Courier New",monospace; | |
87 box-sizing: border-box; | |
88 padding: 0; | |
89 font-size: 90%; | |
90 color: #0084c5; | |
91 white-space: nowrap; | |
92 border-radius: 4px; | |
93 background-color: #f9f2f4; | |
94 } | |
95 | |
96 pre code { | |
97 white-space: inherit; | |
98 color: inherit; | |
99 background-color: inherit; | |
100 } | |
101 | |
102 a { | |
103 color: rgb(42, 100, 150); | |
104 } | |
105 | |
106 h3 > a { | |
107 display: none; | |
108 font-size: 0.8em; | |
109 } | |
110 | |
111 h3:hover > a { | |
112 display: inline; | |
113 } | |
114 </style> | |
115 <body> | |
116 <h2>Messages from package <code>code_transformers</code></h2> | |
117 <hr /> | |
118 | |
119 <div id="code_transformers_1"><h3>Absolute paths not allowed <a href="#code_tran
sformers_1">#1</a></h3> | |
120 <p>The transformers processing your code were trying to resolve a URL and identi
fy | |
121 a file that they correspond to. Currently only relative paths can be resolved.</
p> | |
122 </div><hr /> | |
123 | |
124 <div id="code_transformers_2"><h3>Invalid URL to reach another package <a href="
#code_transformers_2">#2</a></h3> | |
125 <p>To reach an asset that belongs to another package, use <code>package:</code>
URLs in | |
126 Dart code, but in any other language (like HTML or CSS) use relative URLs that | |
127 first go all the way to the <code>packages/</code> directory.</p> | |
128 <p>The rules for correctly writing these imports are subtle and have a lot of | |
129 special cases. Please review | |
130 <a href="https://www.dartlang.org/polymer/app-directories.html">https://www.dart
lang.org/polymer/app-directories.html</a> to learn | |
131 more.</p> | |
132 </div><hr /> | |
133 | |
134 <div id="code_transformers_3"><h3>Incomplete URL to asset in another package <a
href="#code_transformers_3">#3</a></h3> | |
135 <p>URLs that refer to assets in other packages need to explicitly mention the | |
136 <code>packages/</code> directory. In the future this requirement might be remove
d, but for | |
137 now you must use a canonical URL form for it.</p> | |
138 <p>For example, if <code>packages/a/a.html</code> needs to import <code>packages
/b/b.html</code>, | |
139 you might expect a.html to import <code>../b/b.html</code>. Instead, it must imp
ort | |
140 <code>../../packages/b/b.html</code>.</p> | |
141 <p>See <a href="http://dartbug.com/15797">issue 15797</a> and | |
142 <a href="https://www.dartlang.org/polymer/app-directories.html">https://www.dart
lang.org/polymer/app-directories.html</a> to learn more.</p> | |
143 </div><hr /><h2>Messages from package <code>observe</code></h2> | |
144 <hr /> | |
145 | |
146 <div id="observe_1"><h3><code>@observable</code> not supported on libraries <a h
ref="#observe_1">#1</a></h3> | |
147 <p>Only instance fields on <code>Observable</code> classes can be observable, | |
148 and you must explicitly annotate each observable field as <code>@observable</cod
e>.</p> | |
149 <p>Support for using the <code>@observable</code> annotation in libraries, class
es, and | |
150 elsewhere is deprecated.</p> | |
151 </div><hr /> | |
152 | |
153 <div id="observe_2"><h3><code>@observable</code> not supported on top-level fiel
ds <a href="#observe_2">#2</a></h3> | |
154 <p>Only instance fields on <code>Observable</code> classes can be observable, | |
155 and you must explicitly annotate each observable field as <code>@observable</cod
e>.</p> | |
156 <p>Support for using the <code>@observable</code> annotation in libraries, class
es, and | |
157 elsewhere is deprecated.</p> | |
158 </div><hr /> | |
159 | |
160 <div id="observe_3"><h3><code>@observable</code> not supported on classes <a hre
f="#observe_3">#3</a></h3> | |
161 <p>Only instance fields on <code>Observable</code> classes can be observable, | |
162 and you must explicitly annotate each observable field as <code>@observable</cod
e>.</p> | |
163 <p>Support for using the <code>@observable</code> annotation in libraries, class
es, and | |
164 elsewhere is deprecated.</p> | |
165 </div><hr /> | |
166 | |
167 <div id="observe_4"><h3><code>@observable</code> not supported on static fields
<a href="#observe_4">#4</a></h3> | |
168 <p>Only instance fields on <code>Observable</code> classes can be observable, | |
169 and you must explicitly annotate each observable field as <code>@observable</cod
e>.</p> | |
170 <p>Support for using the <code>@observable</code> annotation in libraries, class
es, and | |
171 elsewhere is deprecated.</p> | |
172 </div><hr /> | |
173 | |
174 <div id="observe_5"><h3><code>@observable</code> field not in an <code>Observabl
e</code> class <a href="#observe_5">#5</a></h3> | |
175 <p>Only instance fields on <code>Observable</code> classes can be observable, | |
176 and you must explicitly annotate each observable field as <code>@observable</cod
e>.</p> | |
177 <p>Support for using the <code>@observable</code> annotation in libraries, class
es, and | |
178 elsewhere is deprecated.</p> | |
179 </div><hr /><h2>Messages from package <code>polymer</code></h2> | |
180 <hr /> | |
181 | |
182 <div id="polymer_1"><h3>Import not found <a href="#polymer_1">#1</a></h3> | |
183 <p>An HTML import seems to be broken. This could be because the file doesn't exi
st | |
184 or because the link URL is incorrect.</p> | |
185 </div><hr /> | |
186 | |
187 <div id="polymer_2"><h3>Duplicate definition <a href="#polymer_2">#2</a></h3> | |
188 <p>Custom element names are global and can only be defined once. Some common | |
189 reasons why you might get two definitions:</p><ul><li>Two different elements are
declared with the same name.</li><li> | |
190 <p>A single HTML file defining an element, has been imported using two different | |
191 URLs.</p></li></ul> | |
192 </div><hr /> | |
193 | |
194 <div id="polymer_3"><h3>Missing import to polymer.html <a href="#polymer_3">#3</
a></h3> | |
195 <p>Starting with polymer 0.11.0, each file that uses the definition | |
196 of polymer-element must import it either directly or transitively.</p> | |
197 </div><hr /> | |
198 | |
199 <div id="polymer_4"><h3>Invalid import inside <polymer-element> <a href="#pol
ymer_4">#4</a></h3> | |
200 <p>HTML imports are expected at the top of each document, outside of any | |
201 polymer-element definitions. The polymer build process combines all your HTML | |
202 files together so you can deploy a single HTML file with your application. This | |
203 build process ignores imports that appear to be in the wrong location.</p> | |
204 </div><hr /> | |
205 | |
206 <div id="polymer_5"><h3>Missing call to <code>initPolymer()</code> <a href="#pol
ymer_5">#5</a></h3> | |
207 <p>Your application entry point didn't have any Dart script tags, so it's missin
g | |
208 some initialization needed for polymer.dart.</p> | |
209 </div><hr /> | |
210 | |
211 <div id="polymer_6"><h3>Script tags with experimental bootstrap <a href="#polyme
r_6">#6</a></h3> | |
212 <p>This experimental feature is no longer supported.</p> | |
213 </div><hr /> | |
214 | |
215 <div id="polymer_7"><h3>Multiple Dart script tags per document <a href="#polymer
_7">#7</a></h3> | |
216 <p>Dartium currently allows only one script tag per document. Any | |
217 additional script tags might be ignored or result in an error. This will | |
218 likely change in the future, but for now, combine the script tags together into | |
219 a single Dart library.</p> | |
220 </div><hr /> | |
221 | |
222 <div id="polymer_8"><h3>Imports before script tags <a href="#polymer_8">#8</a></
h3> | |
223 <p>It is good practice to put all your HTML imports at the beginning of the | |
224 document, above any Dart script tags. Today, the execution of Dart script tags | |
225 is not synchronous in Dartium, so the difference is not noticeable. However, | |
226 Dartium that will eventually change and make the timing of script tags execution | |
227 match how they are in JavaScript. At that point the order of your imports with | |
228 respect to script tags will be important. Following the practice of putting | |
229 imports first protects your app from a future breaking change in this respect.</
p> | |
230 </div><hr /> | |
231 | |
232 <div id="polymer_9"><h3>Missing href on a <code><link></code> tag <a href=
"#polymer_9">#9</a></h3> | |
233 <p>All <code><link></code> tags should have a valid URL to a resource.</p> | |
234 </div><hr /> | |
235 | |
236 <div id="polymer_10"><h3><code><element></code> is deprecated <a href="#po
lymer_10">#10</a></h3> | |
237 <p>Long ago <code><polymer-element></code> used to be called <code><ele
ment></code>. You probably ran | |
238 into this error if you were migrating code that was written on a very early | |
239 version of polymer.</p> | |
240 </div><hr /> | |
241 | |
242 <div id="polymer_11"><h3>Definition of a custom element not found <a href="#poly
mer_11">#11</a></h3> | |
243 <p>The polymer build was not able to find the definition of a custom element. Th
is | |
244 can happen if an element is defined with a <code><polymer-element></code>
tag, but you are | |
245 missing an HTML import or the import link is incorrect.</p> | |
246 <p>This warning can also be a false alarm. For instance, when an element is defi
ned | |
247 programatically using <code>document.registerElement</code>. In that case the po
lymer build | |
248 will not be able to see the definition and will produce this warning.</p> | |
249 </div><hr /> | |
250 | |
251 <div id="polymer_12"><h3>Empty script tag <a href="#polymer_12">#12</a></h3> | |
252 <p>Script tags should either have a <code>src</code> attribute or a non-empty bo
dy.</p> | |
253 </div><hr /> | |
254 | |
255 <div id="polymer_13"><h3>Expected Dart mime-type <a href="#polymer_13">#13</a></
h3> | |
256 <p>You seem to have a <code>.dart</code> extension on a script tag, but the mime
-type | |
257 doesn't match <code>application/dart</code>.</p> | |
258 </div><hr /> | |
259 | |
260 <div id="polymer_14"><h3>Expected Dart file extension <a href="#polymer_14">#14<
/a></h3> | |
261 <p>You are using the <code>application/dart</code> mime-type on a script tag, so | |
262 the URL to the script source URL should have a <code>.dart</code> extension.</p> | |
263 </div><hr /> | |
264 | |
265 <div id="polymer_15"><h3>Script with both src and inline text <a href="#polymer_
15">#15</a></h3> | |
266 <p>You have a script tag that includes both a <code>src</code> attribute and inl
ine script | |
267 text. You must choose one or the other.</p> | |
268 </div><hr /> | |
269 | |
270 <div id="polymer_16"><h3>Incorrect instantiation: missing base tag in instantiat
ion <a href="#polymer_16">#16</a></h3> | |
271 <p>When you declare that a custom element extends from a base tag, for example:<
/p> | |
272 <pre><code><polymer-element name="my-example" extends="ul"> | |
273 </code></pre> | |
274 <p>or:</p> | |
275 <pre><code><polymer-element name="my-example2" extends="ul"> | |
276 <polymer-element name="my-example" extends="my-example2"> | |
277 </code></pre> | |
278 <p>You should instantiate <code>my-example</code> by using this syntax:</p> | |
279 <pre><code><ul is="my-example"> | |
280 </code></pre> | |
281 <p>And not:</p> | |
282 <pre><code><my-example> | |
283 </code></pre> | |
284 <p>Only elements that don't extend from existing HTML elements are created using | |
285 the latter form.</p> | |
286 <p>This is because browsers first create the base element, and then upgrade it t
o | |
287 have the extra functionality of your custom element. In the example above, using | |
288 <code><ul></code> tells the browser which base type it must create before | |
289 doing the upgrade.</p> | |
290 </div><hr /> | |
291 | |
292 <div id="polymer_17"><h3>Incorrect instantiation: extra <code>is</code> attribut
e or missing <code>extends</code> in declaration <a href="#polymer_17">#17</a></
h3> | |
293 <p>Creating a custom element using the syntax:</p> | |
294 <pre><code><ul is="my-example"> | |
295 </code></pre> | |
296 <p>means that the declaration of <code>my-example</code> extends transitively fr
om <code>ul</code>. This | |
297 error message is shown if the definition of <code>my-example</code> doesn't decl
are this | |
298 extension. It might be that you no longer extend from the base element, in which | |
299 case the fix is to change the instantiation to:</p> | |
300 <pre><code><my-example> | |
301 </code></pre> | |
302 <p>Another possibility is that the declaration needs to be fixed to include the | |
303 <code>extends</code> attribute, for example:</p> | |
304 <pre><code><polymer-element name="my-example" extends="ul"> | |
305 </code></pre> | |
306 </div><hr /> | |
307 | |
308 <div id="polymer_18"><h3>Incorrect instantiation: base tag seems wrong <a href="
#polymer_18">#18</a></h3> | |
309 <p>It seems you have a declaration like:</p> | |
310 <pre><code><polymer-element name="my-example" extends="div"> | |
311 </code></pre> | |
312 <p>but an instantiation like:</p> | |
313 <pre><code><span is="my-example"> | |
314 </code></pre> | |
315 <p>Both the declaration and the instantiation need to match on the base type. So | |
316 either the instantiation needs to be fixed to be more like:</p> | |
317 <pre><code><span is="my-example"> | |
318 </code></pre> | |
319 <p>or the declaration should be fixed to be like:</p> | |
320 <pre><code><polymer-element name="my-example" extends="span"> | |
321 </code></pre> | |
322 </div><hr /> | |
323 | |
324 <div id="polymer_19"><h3>No dashes allowed in custom attributes <a href="#polyme
r_19">#19</a></h3> | |
325 <p>Polymer used to recognize attributes with dashes like <code>my-name</code> an
d convert them | |
326 to match properties where dashes were removed, and words follow the camelCase | |
327 style (for example <code>myName</code>). This feature is no longer available. No
w simply | |
328 use the same name as the property.</p> | |
329 <p>Because HTML attributes are case-insensitive, you can also write the name of | |
330 your property entirely in lowercase. Just be sure that your custom-elements | |
331 don't declare two properties with the same name but different capitalization.</p
> | |
332 </div><hr /> | |
333 | |
334 <div id="polymer_20"><h3>Event handlers not supported here <a href="#polymer_20"
>#20</a></h3> | |
335 <p>Bindings of the form <code>{{ }}</code> are supported inside <code><templa
te></code> nodes, even outside | |
336 of <code><polymer-element></code> declarations. However, those bindings on
ly support binding | |
337 values into the content of a node or an attribute.</p> | |
338 <p>Inline event handlers of the form <code>on-click="{{method}}"</code> are a sp
ecial feature | |
339 of polymer elements, so they are only supported inside <code><polymer-element
></code> | |
340 definitions.</p> | |
341 </div><hr /> | |
342 | |
343 <div id="polymer_21"><h3>No expressions allowed in event handler bindings <a hre
f="#polymer_21">#21</a></h3> | |
344 <p>Unlike data bindings, event handler bindings of the form <code>on-click="{{me
thod}}"</code> | |
345 are not evaluated as expressions. They are meant to just contain a simple name | |
346 that resolves to a method in your polymer element's class definition.</p> | |
347 </div><hr /> | |
348 | |
349 <div id="polymer_22"><h3>Nested polymer element definitions not allowed <a href=
"#polymer_22">#22</a></h3> | |
350 <p>Because custom element names are global, there is no need to have a | |
351 <code><polymer-element></code> definition nested within a <code><polyme
r-element></code>. If you have | |
352 a definition inside another, move the second definition out.</p> | |
353 <p>You might see this error if you have an HTML import within a polymer element. | |
354 You should be able to move the import out of the element definition.</p> | |
355 </div><hr /> | |
356 | |
357 <div id="polymer_23"><h3>Polymer element definitions without a name <a href="#po
lymer_23">#23</a></h3> | |
358 <p>Polymer element definitions must have a name. You can include a name by using | |
359 the <code>name</code> attribute in <code><polymer-element></code> for exam
ple:</p> | |
360 <pre><code><polymer-element name="my-example"> | |
361 </code></pre> | |
362 </div><hr /> | |
363 | |
364 <div id="polymer_24"><h3>Custom element name missing a dash <a href="#polymer_24
">#24</a></h3> | |
365 <p>Custom element names must have a dash (<code>-</code>) and can't be any of th
e following | |
366 reserved names:</p><ul><li><code>annotation-xml</code></li><li><code>color-profi
le</code></li><li><code>font-face</code></li><li><code>font-face-src</code></li>
<li><code>font-face-uri</code></li><li><code>font-face-format</code></li><li><co
de>font-face-name</code></li><li><code>missing-glyph</code></li></ul> | |
367 </div><hr /> | |
368 | |
369 <div id="polymer_25"><h3>Error while inlining an import <a href="#polymer_25">#2
5</a></h3> | |
370 <p>An error occurred while inlining an import in the polymer build. This is ofte
n | |
371 the result of a broken HTML import.</p> | |
372 </div><hr /> | |
373 | |
374 <div id="polymer_26"><h3>Error while inlining a stylesheet <a href="#polymer_26"
>#26</a></h3> | |
375 <p>An error occurred while inlining a stylesheet in the polymer build. This is | |
376 often the result of a broken URL in a <code><link rel="stylesheet" href="..."
></code>.</p> | |
377 </div><hr /> | |
378 | |
379 <div id="polymer_27"><h3>URL to a script file might be incorrect <a href="#polym
er_27">#27</a></h3> | |
380 <p>An error occurred trying to read a script tag on a given URL. This is often t
he | |
381 result of a broken URL in a <code><script src="..."></code>.</p> | |
382 </div><hr /> | |
383 | |
384 <div id="polymer_28"><h3>Attribute missing "_" prefix <a href="#polymer_28">#28<
/a></h3> | |
385 <p>Not all browsers support bindings to certain attributes, especially URL | |
386 attributes. Some browsers might sanitize attributes and result in an | |
387 incorrect value. For this reason polymer provides a special set of attributes | |
388 that let you bypass any browser internal attribute validation. The name of the | |
389 attribute is the same as the original attribute, but with a leading underscore. | |
390 For example, instead of writing:</p> | |
391 <pre><code><img src="{{binding}}"> | |
392 </code></pre> | |
393 <p>you can write:</p> | |
394 <pre><code><img _src="{{binding}}"> | |
395 </code></pre> | |
396 <p>For more information, see <a href="http://goo.gl/5av8cU">http://goo.gl/5av8cU
</a>.</p> | |
397 </div><hr /> | |
398 | |
399 <div id="polymer_29"><h3>Attribute with extra "_" prefix <a href="#polymer_29">#
29</a></h3> | |
400 <p>A special attribute exists to support bindings on URL attributes. For example
, | |
401 this correctly binds the <code>src</code> attribute in an image:</p> | |
402 <pre><code><img _src="{{binding}}"> | |
403 </code></pre> | |
404 <p>However, this special <code>_src</code> attribute is only available for bindi
ngs. If you | |
405 just have a URL, use the normal <code>src</code> attribute instead.</p> | |
406 </div><hr /> | |
407 | |
408 <div id="polymer_30"><h3>Internal error: don't know how to include a URL <a href
="#polymer_30">#30</a></h3> | |
409 <p>Sorry, you just ran into a bug in the polymer transformer code. Please file a | |
410 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if
possible, some example code that | |
411 can help the team reproduce the issue.</p> | |
412 </div><hr /> | |
413 | |
414 <div id="polymer_31"><h3>Internal error: phases run out of order <a href="#polym
er_31">#31</a></h3> | |
415 <p>Sorry, you just ran into a bug in the polymer transformer code. Please file a | |
416 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if
possible, some example code that | |
417 can help the team reproduce the issue.</p> | |
418 </div><hr /> | |
419 | |
420 <div id="polymer_32"><h3><code>@CustomTag</code> used on a private class <a href
="#polymer_32">#32</a></h3> | |
421 <p>The <code>@CustomTag</code> annotation is currently only supported on public
classes. If | |
422 you need to register a custom element whose implementation is a private class | |
423 (that is, a class whose name starts with <code>_</code>), you can still do so by
invoking | |
424 <code>Polymer.register</code> within a public method marked with <code>@initMeth
od</code>.</p> | |
425 </div><hr /> | |
426 | |
427 <div id="polymer_33"><h3><code>@initMethod</code> is on a private function <a hr
ef="#polymer_33">#33</a></h3> | |
428 <p>The <code>@initMethod</code> annotation is currently only supported on public
top-level | |
429 functions.</p> | |
430 </div><hr /> | |
431 | |
432 <div id="polymer_34"><h3>Missing argument in annotation <a href="#polymer_34">#3
4</a></h3> | |
433 <p>The annotation expects one argument, but the argument was not provided.</p> | |
434 </div><hr /> | |
435 | |
436 <div id="polymer_35"><h3>Invalid argument in annotation <a href="#polymer_35">#3
5</a></h3> | |
437 <p>The polymer transformer was not able to extract a constant value for the | |
438 annotation argument. This can happen if your code is currently in a state that | |
439 can't be analyzed (for example, it has parse errors) or if the expression passed | |
440 as an argument is invalid (for example, it is not a compile-time constant).</p> | |
441 </div><hr /> | |
442 | |
443 <div id="polymer_36"><h3>No polymer initializers found <a href="#polymer_36">#36
</a></h3> | |
444 <p>No polymer initializers were found. Make sure to either | |
445 annotate your polymer elements with @CustomTag or include a | |
446 top level method annotated with @initMethod that registers your | |
447 elements. Both annotations are defined in the polymer library ( | |
448 package:polymer/polymer.dart).</p> | |
449 </div><hr /> | |
450 | |
451 <div id="polymer_37"><h3>Event bindings with @ are no longer supported <a href="
#polymer_37">#37</a></h3> | |
452 <p>For a while there was an undocumented feature that allowed users to include | |
453 expressions in event bindings using the <code>@</code> prefix, for example:</p> | |
454 <pre><code><div on-click="{{@a.b.c}}"> | |
455 | |
456 </code></pre> | |
457 <p>This feature is no longer supported.</p> | |
458 </div><hr /> | |
459 | |
460 <div id="polymer_38"><h3>Private symbol in event handler <a href="#polymer_38">#
38</a></h3> | |
461 <p>Currently private members can't be used in event handler bindings. So you can
't | |
462 write:</p> | |
463 <pre><code><div on-click="{{_method}}"> | |
464 </code></pre> | |
465 <p>This restriction might be removed in the future, but for now, you need to mak
e | |
466 your event handlers public.</p> | |
467 </div><hr /> | |
468 | |
469 <div id="polymer_39"><h3>Private symbol in binding expression <a href="#polymer_
39">#39</a></h3> | |
470 <p>Private members can't be used in binding expressions. For example, you can't | |
471 write:</p> | |
472 <pre><code><div>{{a.b._c}}</div> | |
473 </code></pre> | |
474 </div><hr /> | |
475 | |
476 <div id="polymer_40"><h3>A warning was found while parsing the HTML document <a
href="#polymer_40">#40</a></h3> | |
477 <p>The polymer transformer uses a parser that implements the HTML5 spec | |
478 (<code>html</code>). This message reports a | |
479 warning that the parser detected.</p> | |
480 </div><hr /> | |
481 | |
482 <div id="polymer_41"><h3>Possible flash of unstyled content <a href="#polymer_41
">#41</a></h3> | |
483 <p>Custom element found in document body without an "unresolved" attribute on it
or | |
484 one of its parents. This means your app probably has a flash of unstyled content | |
485 before it finishes loading. See <a href="http://goo.gl/iN03Pj">http://goo.gl/iN0
3Pj</a> for more info.</p> | |
486 </div><hr /> | |
487 | |
488 <div id="polymer_42"><h3>A css file was inlined multiple times. <a href="#polyme
r_42">#42</a></h3> | |
489 <p>Css files are inlined by default, but if you import the same one in multiple | |
490 places you probably want to change this behavior to prevent duplicate code.</p> | |
491 <p>There are three typical options for dealing with this:</p><ol><li> | |
492 <p><strong>Recommended</strong>: Use the <code>core-style</code> element from th
e <code>core_elements</code> | |
493 package.</p> | |
494 <p>The easiest way to do this is change your <code>*.css</code> file into a <cod
e>*.html</code> file, | |
495 and wrap the entire thing in a <code>core-style</code> with an id, something lik
e the | |
496 following:</p> | |
497 <pre><code><core-style id="my-theme"> | |
498 p { | |
499 color: red; | |
500 } | |
501 </core-style> | |
502 </code></pre> | |
503 <p>Now, in the files where you were previously including the | |
504 <code><link rel="stylesheet"></code> tag, add an html import to the top of
your | |
505 document pointing to the new html file. Once that is done, replace the | |
506 <code><link></code> tag with a <code><core-style></code> tag which h
as a <code>ref</code> attribute that is | |
507 the same as the <code>id</code> attribute on the <code><core-style></code>
you created. So your | |
508 original html:</p> | |
509 <pre><code><polymer-element name="my-element"> | |
510 <template> | |
511 <link rel="stylesheet" href="my_theme.css"> | |
512 </template> | |
513 </polymer-element> | |
514 </code></pre> | |
515 <p>Becomes:</p> | |
516 <pre><code><link rel="import" href="my_theme.html"> | |
517 <polymer-element name="my-element"> | |
518 <template> | |
519 <core-style ref="my-theme"></core-style> | |
520 </template> | |
521 </polymer-element> | |
522 </code></pre></li><li> | |
523 <p>Opt out of the inlining for this file in your pubspec.yaml:</p> | |
524 <pre><code>transformers: | |
525 - polymer: | |
526 inline_stylesheets: | |
527 web/my_file.css: false | |
528 </code></pre> | |
529 <p><strong>Warning</strong>: <code><link rel="stylesheet"></code> tags are
not natively supported in | |
530 shadow-dom. Polymer will do an xhr request for the stylesheet and inject an | |
531 inline style with its contents in each place this stylesheet occurs.</p></li><li
> | |
532 <p>Opt into multiple inlining in your pubspec.yaml:</p> | |
533 <pre><code>transformers: | |
534 - polymer: | |
535 inline_stylesheets: | |
536 web/my_file.css: true | |
537 </code></pre> | |
538 <p><strong>Warning</strong>: You should only ever do this if your stylesheet is
very small. | |
539 Even then stylesheets tend to grow quickly and almost never decrease in size | |
540 so this method is highly discouraged.</p></li></ol> | |
541 </div><hr /> | |
542 | |
543 <div id="polymer_43"><h3>"dart_support.js" injected automatically <a href="#poly
mer_43">#43</a></h3> | |
544 <p>The script <code>packages/web_components/dart_support.js</code> is still used
, but you no | |
545 longer need to put it in your application's entrypoint.</p> | |
546 <p>In the past this file served two purposes:</p><ul><li>to make dart2js work we
ll with the web_components polyfills, and</li><li>to support registering Dart AP
Is for JavaScript custom elements.</li></ul> | |
547 <p>Now, the code from <code>dart_support.js</code> is split in two halves. The h
alf for | |
548 dart2js is now injected by the polymer transformers automatically during <code>p
ub | |
549 build</code>. The <code>web_components</code> package provides an HTML file cont
aining the other | |
550 half. Developers of packages that wrap JavaScript custom elements (like | |
551 <code>core_elements</code> and <code>paper_elements</code>) will import that fil
e directly, so | |
552 application developers don't have to worry about it anymore.</p> | |
553 </div><hr /> | |
554 | |
555 <div id="polymer_44"><h3>Dart script file included more than once. <a href="#pol
ymer_44">#44</a></h3> | |
556 <p>Duplicate dart scripts often happen if you have multiple html imports that | |
557 include the same script. The simplest workaround for this is to move your dart | |
558 script to its own html file, and import that instead of the script (html imports | |
559 are automatically deduped).</p> | |
560 <p>For example:</p> | |
561 <pre><code><script type="application/dart" src="foo.dart"></script> | |
562 </code></pre> | |
563 <p>Should turn into:</p> | |
564 <pre><code><link rel="import" href="foo.html"> | |
565 </code></pre> | |
566 <p>And <code>foo.html</code> should look like:</p> | |
567 <pre><code><script type="application/dart" src="foo.dart"></script> | |
568 </code></pre> | |
569 </div><hr /> | |
570 | |
571 <div id="polymer_45"><h3>"webcomponents.js" injected automatically <a href="#pol
ymer_45">#45</a></h3> | |
572 <p>The script <code>packages/web_components/webcomponents.js</code> is still use
d, but you no | |
573 longer need to put it in your application's entrypoint.</p> | |
574 <p>The polyfills provided by this file are no longer required in chrome and will | |
575 automatically be added during <code>pub build</code> and <code>pub serve</code>.
</p> | |
576 </div><hr /> | |
577 | |
578 <div id="polymer_46"><h3>"platform.js" renamed to "webcomponents.js". <a href="#
polymer_46">#46</a></h3> | |
579 <p>The script <code>packages/web_components/platform.js</code> has been renamed
to | |
580 <code>packages/web_components/webcomponents.js</code>. This is automatically fix
ed in | |
581 <code>pub serve</code> and <code>pub build</code> but we may remove this functio
nality in the next | |
582 breaking version of Polymer.</p> | |
583 <p>In addition, it is no longer required that you include this file directly, as | |
584 <code>pub build</code> and <code>pub serve</code> will inject it for you, and it
s not required when | |
585 running in dartium with a local server.</p> | |
586 </div><hr /> | |
587 | |
588 <div id="polymer_47"><h3>Missing Dart script tag in entry point. <a href="#polym
er_47">#47</a></h3> | |
589 <p>All entry points should have a dart script file. This can sometimes happen if | |
590 you are using the default entry_points value in your polymer transformer | |
591 configuration but have files which are not entry points in your <code>web</code>
or <code>test</code> | |
592 directory. Moving these files to your <code>lib</code> folder or specifying all
your entry | |
593 points in your configuration will fix this.</p> | |
594 </div><hr /> | |
595 | |
596 <div id="polymer_48"><h3>polymer.dart not imported. <a href="#polymer_48">#48</a
></h3> | |
597 <p>It is required that your application contains an import to | |
598 <code>package:polymer/polymer.dart</code>.</p> | |
599 </div><hr /><h2>Messages from package <code>web_components</code></h2> | |
600 <hr /> | |
601 | |
602 <div id="web_components_0"><h3>URL to a script file might be incorrect <a href="
#web_components_0">#0</a></h3> | |
603 <p>An error occurred trying to read a script tag on a given URL. This is often t
he | |
604 result of a broken URL in a <code><script src="..."></code>.</p> | |
605 </div><hr /> | |
606 | |
607 <div id="web_components_1"><h3>Dart script file included more than once. <a href
="#web_components_1">#1</a></h3> | |
608 <p>Duplicate dart scripts often happen if you have multiple html imports that | |
609 include the same script. The simplest workaround for this is to move your dart | |
610 script to its own html file, and import that instead of the script (html imports | |
611 are automatically deduped).</p> | |
612 <p>For example:</p> | |
613 <pre><code><script type="application/dart" src="foo.dart"></script> | |
614 </code></pre> | |
615 <p>Should turn into:</p> | |
616 <pre><code><link rel="import" href="foo.html"> | |
617 </code></pre> | |
618 <p>And <code>foo.html</code> should look like:</p> | |
619 <pre><code><script type="application/dart" src="foo.dart"></script> | |
620 </code></pre> | |
621 </div><hr /> | |
622 | |
623 <div id="web_components_2"><h3>Each entry point html file should contain exactly
one dart script tag. <a href="#web_components_2">#2</a></h3> | |
624 <p>Each entry point html file should contain exactly one dart script tag.</p> | |
625 </div><hr /> | |
626 | |
627 <div id="web_components_3"><h3>Internal error: don't know how to include a URL <
a href="#web_components_3">#3</a></h3> | |
628 <p>Sorry, you just ran into a bug in the web_components transformer code. Please | |
629 file a bug at <a href="https://github.com/dart-lang/web-components/issues/new">h
ttps://github.com/dart-lang/web-components/issues/new</a> | |
630 including, if possible, some example code that can help the team reproduce the | |
631 issue.</p> | |
632 </div><hr /> | |
633 | |
634 <div id="web_components_4"><h3>Error while inlining an import <a href="#web_comp
onents_4">#4</a></h3> | |
635 <p>An error occurred while inlining an import in the web_components build. This
is | |
636 often the result of a broken HTML import.</p> | |
637 <p>One possible cause is using an @HtmlImport containing a relative path from | |
638 within an inline script tag, see http://goo.gl/ZgrhaV. The workaround currently | |
639 is to use a <code>package:</code> url instead, move the code to a dart file, or
simply | |
640 adding a real html import (since you are already in an html file).</p> | |
641 </div><hr /></body> | |
642 </html> | |
OLD | NEW |