Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Side by Side Diff: pkg/polymer/lib/src/build/generated/messages.html

Issue 562823003: Style improvements in polymer error/warning messages page. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <!-- 2 <!--
3 This file is autogenerated with polymer/tool/create_message_details_page.dart 3 This file is autogenerated with polymer/tool/create_message_details_page.dart
4 --> 4 -->
5 <html> 5 <html>
6 <style> 6 <style>
7 @font-face { 7 @font-face {
8 font-family: 'Montserrat'; 8 font-family: 'Montserrat';
9 font-style: normal; 9 font-style: normal;
10 font-weight: 400; 10 font-weight: 400;
(...skipping 15 matching lines...) Expand all
26 font-family: 'Roboto'; 26 font-family: 'Roboto';
27 font-style: normal; 27 font-style: normal;
28 font-weight: 400; 28 font-weight: 400;
29 src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/CrYjSnGj rRCn0pd9VQsnFOvvDin1pK8aKteLpeZ5c0A.woff) format('woff'); 29 src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/CrYjSnGj rRCn0pd9VQsnFOvvDin1pK8aKteLpeZ5c0A.woff) format('woff');
30 } 30 }
31 31
32 body { 32 body {
33 width: 80vw; 33 width: 80vw;
34 margin: 20px; 34 margin: 20px;
35 font-family: Roboto, sans-serif; 35 font-family: Roboto, sans-serif;
36 background-color: #f0f0f0;
36 } 37 }
37 38
38 h2 { 39 h2 {
39 font-family: Montserrat, sans-serif; 40 font-family: Montserrat, sans-serif;
40 box-sizing: border-box; 41 box-sizing: border-box;
41 color: rgb(72, 72, 72); 42 color: rgb(72, 72, 72);
42 display: block; 43 display: block;
43 font-style: normal; 44 font-style: normal;
44 font-variant: normal; 45 font-variant: normal;
45 font-weight: normal; 46 font-weight: normal;
46 } 47 }
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
48 h3 { 59 h3 {
49 font-family: Montserrat, sans-serif; 60 font-family: Montserrat, sans-serif;
50 box-sizing: border-box; 61 box-sizing: border-box;
51 color: rgb(72, 72, 72); 62 color: rgb(72, 72, 72);
52 display: block; 63 display: block;
53 font-style: normal; 64 font-style: normal;
54 font-variant: normal; 65 font-variant: normal;
55 font-weight: normal; 66 font-weight: normal;
56 } 67 }
57 68
69 div:target > h3 {
70 font-weight: bold;
71 }
72
58 pre { 73 pre {
59 display: block; 74 display: block;
60 padding: 9.5px; 75 padding: 9.5px;
61 margin: 0 0 10px; 76 margin: 0 0 10px;
62 color: #333; 77 color: #333;
63 word-break: break-all; 78 word-break: break-all;
64 word-wrap: break-word; 79 word-wrap: break-word;
65 background-color: #f5f5f5; 80 background-color: #f5f5f5;
66 border: 1px solid #ccc; 81 border: 1px solid #ccc;
67 border-radius: 4px; 82 border-radius: 4px;
(...skipping 26 matching lines...) Expand all
94 } 109 }
95 110
96 h3:hover > a { 111 h3:hover > a {
97 display: inline; 112 display: inline;
98 } 113 }
99 </style> 114 </style>
100 <body> 115 <body>
101 <h2>Messages from package <code>code_transformers</code></h2> 116 <h2>Messages from package <code>code_transformers</code></h2>
102 <hr /> 117 <hr />
103 118
104 <h3 id="code_transformers_1">Absolute paths not allowed <a href="#code_transform ers_1">#1</a></h3> 119 <div id="code_transformers_1"><h3>Absolute paths not allowed <a href="#code_tran sformers_1">#1</a></h3>
105 <p>The transformers processing your code were trying to resolve a URL and identi fy 120 <p>The transformers processing your code were trying to resolve a URL and identi fy
106 a file that they correspond to. Currently only relative paths can be resolved.</ p> 121 a file that they correspond to. Currently only relative paths can be resolved.</ p>
107 <hr /> 122 </div><hr />
108 123
109 <h3 id="code_transformers_2">Invalid URL to reach another package <a href="#code _transformers_2">#2</a></h3> 124 <div id="code_transformers_2"><h3>Invalid URL to reach another package <a href=" #code_transformers_2">#2</a></h3>
110 <p>To reach an asset that belongs to another package, use <code>package:</code> URLs in 125 <p>To reach an asset that belongs to another package, use <code>package:</code> URLs in
111 Dart code, but in any other language (like HTML or CSS) use relative URLs.</p> 126 Dart code, but in any other language (like HTML or CSS) use relative URLs.</p>
112 <p>These are the rules you must follow to write URLs that refer to files in othe r 127 <p>These are the rules you must follow to write URLs that refer to files in othe r
113 packages:</p><ul><li> 128 packages:</p><ul><li>
114 <p>If the file containing the relative URL is an entrypoint under <code>web</cod e>, use 129 <p>If the file containing the relative URL is an entrypoint under <code>web</cod e>, use
115 <code>packages/package_name/path_to_file</code></p></li><li> 130 <code>packages/package_name/path_to_file</code></p></li><li>
116 <p>If the file containing the URL is under <code>web</code>, but in a different directory 131 <p>If the file containing the URL is under <code>web</code>, but in a different directory
117 than your entrypoint, walk out to the same level as the entrypoint first, 132 than your entrypoint, walk out to the same level as the entrypoint first,
118 then enter the <code>packages</code> directory.</p> 133 then enter the <code>packages</code> directory.</p>
119 <p><strong>Note</strong>: If two entrypoints include the file under <code>web</c ode> containing the 134 <p><strong>Note</strong>: If two entrypoints include the file under <code>web</c ode> containing the
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 you may see errors at runtime like: <code>A is not a subtype of A</code>, which can be 224 you may see errors at runtime like: <code>A is not a subtype of A</code>, which can be
210 extremely confusing.</p> 225 extremely confusing.</p>
211 <p>When you follow the rules above, our tools can detect the pattern in the 226 <p>When you follow the rules above, our tools can detect the pattern in the
212 HTML-import URL containing <code>packages/</code> and canonicalize the import 227 HTML-import URL containing <code>packages/</code> and canonicalize the import
213 by converting <code>packages/a/a.dart</code> into <code>package:a/a.dart</code> under the hood.</p></li><li> 228 by converting <code>packages/a/a.dart</code> into <code>package:a/a.dart</code> under the hood.</p></li><li>
214 <p>They need to continue to be valid after applications are built. 229 <p>They need to continue to be valid after applications are built.
215 Technically this could be done automatically with pub transformers, but to 230 Technically this could be done automatically with pub transformers, but to
216 make sure that code works also in Dartium with a simple HTTP Server, 231 make sure that code works also in Dartium with a simple HTTP Server,
217 existing transformers do not fix URLs, they just detect inconsistencies and 232 existing transformers do not fix URLs, they just detect inconsistencies and
218 produce an error message like this one, instead.</p></li></ul> 233 produce an error message like this one, instead.</p></li></ul>
219 <hr /> 234 </div><hr />
220 235
221 <h3 id="code_transformers_3">Incomplete URL to asset in another package <a href= "#code_transformers_3">#3</a></h3> 236 <div id="code_transformers_3"><h3>Incomplete URL to asset in another package <a href="#code_transformers_3">#3</a></h3>
222 <p>URLs that refer to assets in other packages need to explicitly mention the 237 <p>URLs that refer to assets in other packages need to explicitly mention the
223 <code>packages/</code> directory. In the future this requirement might be remove d, but for 238 <code>packages/</code> directory. In the future this requirement might be remove d, but for
224 now you must use a canonical URL form for it.</p> 239 now you must use a canonical URL form for it.</p>
225 <p>For example, if <code>packages/a/a.html</code> needs to import <code>packages /b/b.html</code>, 240 <p>For example, if <code>packages/a/a.html</code> needs to import <code>packages /b/b.html</code>,
226 you might expect a.html to import <code>../b/b.html</code>. Instead, it must imp ort 241 you might expect a.html to import <code>../b/b.html</code>. Instead, it must imp ort
227 <code>../../packages/b/b.html</code>. 242 <code>../../packages/b/b.html</code>.
228 See <a href="http://dartbug.com/15797">issue 15797</a>.</p> 243 See <a href="http://dartbug.com/15797">issue 15797</a>.</p>
229 <hr /><h2>Messages from package <code>observe</code></h2> 244 </div><hr /><h2>Messages from package <code>observe</code></h2>
230 <hr /> 245 <hr />
231 246
232 <h3 id="observe_1"><code>@observable</code> not supported on libraries <a href=" #observe_1">#1</a></h3> 247 <div id="observe_1"><h3><code>@observable</code> not supported on libraries <a h ref="#observe_1">#1</a></h3>
233 <p>Only instance fields on <code>Observable</code> classes can be observable, 248 <p>Only instance fields on <code>Observable</code> classes can be observable,
234 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p> 249 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p>
235 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and 250 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and
236 elsewhere is deprecated.</p> 251 elsewhere is deprecated.</p>
237 <hr /> 252 </div><hr />
238 253
239 <h3 id="observe_2"><code>@observable</code> not supported on top-level fields <a href="#observe_2">#2</a></h3> 254 <div id="observe_2"><h3><code>@observable</code> not supported on top-level fiel ds <a href="#observe_2">#2</a></h3>
240 <p>Only instance fields on <code>Observable</code> classes can be observable, 255 <p>Only instance fields on <code>Observable</code> classes can be observable,
241 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p> 256 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p>
242 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and 257 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and
243 elsewhere is deprecated.</p> 258 elsewhere is deprecated.</p>
244 <hr /> 259 </div><hr />
245 260
246 <h3 id="observe_3"><code>@observable</code> not supported on classes <a href="#o bserve_3">#3</a></h3> 261 <div id="observe_3"><h3><code>@observable</code> not supported on classes <a hre f="#observe_3">#3</a></h3>
247 <p>Only instance fields on <code>Observable</code> classes can be observable, 262 <p>Only instance fields on <code>Observable</code> classes can be observable,
248 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p> 263 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p>
249 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and 264 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and
250 elsewhere is deprecated.</p> 265 elsewhere is deprecated.</p>
251 <hr /> 266 </div><hr />
252 267
253 <h3 id="observe_4"><code>@observable</code> not supported on static fields <a hr ef="#observe_4">#4</a></h3> 268 <div id="observe_4"><h3><code>@observable</code> not supported on static fields <a href="#observe_4">#4</a></h3>
254 <p>Only instance fields on <code>Observable</code> classes can be observable, 269 <p>Only instance fields on <code>Observable</code> classes can be observable,
255 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p> 270 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p>
256 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and 271 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and
257 elsewhere is deprecated.</p> 272 elsewhere is deprecated.</p>
258 <hr /> 273 </div><hr />
259 274
260 <h3 id="observe_5"><code>@observable</code> field not in an <code>Observable</co de> class <a href="#observe_5">#5</a></h3> 275 <div id="observe_5"><h3><code>@observable</code> field not in an <code>Observabl e</code> class <a href="#observe_5">#5</a></h3>
261 <p>Only instance fields on <code>Observable</code> classes can be observable, 276 <p>Only instance fields on <code>Observable</code> classes can be observable,
262 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p> 277 and you must explicitly annotate each observable field as <code>@observable</cod e>.</p>
263 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and 278 <p>Support for using the <code>@observable</code> annotation in libraries, class es, and
264 elsewhere is deprecated.</p> 279 elsewhere is deprecated.</p>
265 <hr /><h2>Messages from package <code>polymer</code></h2> 280 </div><hr /><h2>Messages from package <code>polymer</code></h2>
266 <hr /> 281 <hr />
267 282
268 <h3 id="polymer_1">Import not found <a href="#polymer_1">#1</a></h3> 283 <div id="polymer_1"><h3>Import not found <a href="#polymer_1">#1</a></h3>
269 <p>An HTML import seems to be broken. This could be because the file doesn't exi st 284 <p>An HTML import seems to be broken. This could be because the file doesn't exi st
270 or because the link URL is incorrect.</p> 285 or because the link URL is incorrect.</p>
271 <hr /> 286 </div><hr />
272 287
273 <h3 id="polymer_2">Duplicate definition <a href="#polymer_2">#2</a></h3> 288 <div id="polymer_2"><h3>Duplicate definition <a href="#polymer_2">#2</a></h3>
274 <p>Custom element names are global and can only be defined once. Some common 289 <p>Custom element names are global and can only be defined once. Some common
275 reasons why you might get two definitions:</p><ul><li>Two different elements are declared with the same name.</li><li> 290 reasons why you might get two definitions:</p><ul><li>Two different elements are declared with the same name.</li><li>
276 <p>A single HTML file defining an element, has been imported using two different 291 <p>A single HTML file defining an element, has been imported using two different
277 URLs.</p></li></ul> 292 URLs.</p></li></ul>
278 <hr /> 293 </div><hr />
279 294
280 <h3 id="polymer_3">Missing import to polymer.html <a href="#polymer_3">#3</a></h 3> 295 <div id="polymer_3"><h3>Missing import to polymer.html <a href="#polymer_3">#3</ a></h3>
281 <p>Starting with polymer 0.11.0, each file that uses the definition 296 <p>Starting with polymer 0.11.0, each file that uses the definition
282 of polymer-element must import it either directly or transitively.</p> 297 of polymer-element must import it either directly or transitively.</p>
283 <hr /> 298 </div><hr />
284 299
285 <h3 id="polymer_4">Invalid import inside &lt;polymer-element> <a href="#polymer_ 4">#4</a></h3> 300 <div id="polymer_4"><h3>Invalid import inside &lt;polymer-element> <a href="#pol ymer_4">#4</a></h3>
286 <p>HTML imports are expected at the top of each document, outside of any 301 <p>HTML imports are expected at the top of each document, outside of any
287 polymer-element definitions. The polymer build process combines all your HTML 302 polymer-element definitions. The polymer build process combines all your HTML
288 files together so you can deploy a single HTML file with your application. This 303 files together so you can deploy a single HTML file with your application. This
289 build process ignores imports that appear to be in the wrong location.</p> 304 build process ignores imports that appear to be in the wrong location.</p>
290 <hr /> 305 </div><hr />
291 306
292 <h3 id="polymer_5">Missing call to <code>initPolymer()</code> <a href="#polymer_ 5">#5</a></h3> 307 <div id="polymer_5"><h3>Missing call to <code>initPolymer()</code> <a href="#pol ymer_5">#5</a></h3>
293 <p>Your application entry point didn't have any Dart script tags, so it's missin g 308 <p>Your application entry point didn't have any Dart script tags, so it's missin g
294 some initialization needed for polymer.dart.</p> 309 some initialization needed for polymer.dart.</p>
295 <hr /> 310 </div><hr />
296 311
297 <h3 id="polymer_6">Script tags with experimental bootstrap <a href="#polymer_6"> #6</a></h3> 312 <div id="polymer_6"><h3>Script tags with experimental bootstrap <a href="#polyme r_6">#6</a></h3>
298 <p>This experimental feature is no longer supported.</p> 313 <p>This experimental feature is no longer supported.</p>
299 <hr /> 314 </div><hr />
300 315
301 <h3 id="polymer_7">Multiple Dart script tags per document <a href="#polymer_7"># 7</a></h3> 316 <div id="polymer_7"><h3>Multiple Dart script tags per document <a href="#polymer _7">#7</a></h3>
302 <p>Dartium currently allows only one script tag per document. Any 317 <p>Dartium currently allows only one script tag per document. Any
303 additional script tags might be ignored or result in an error. This will 318 additional script tags might be ignored or result in an error. This will
304 likely change in the future, but for now, combine the script tags together into 319 likely change in the future, but for now, combine the script tags together into
305 a single Dart library.</p> 320 a single Dart library.</p>
306 <hr /> 321 </div><hr />
307 322
308 <h3 id="polymer_8">Imports before script tags <a href="#polymer_8">#8</a></h3> 323 <div id="polymer_8"><h3>Imports before script tags <a href="#polymer_8">#8</a></ h3>
309 <p>It is good practice to put all your HTML imports at the beginning of the 324 <p>It is good practice to put all your HTML imports at the beginning of the
310 document, above any Dart script tags. Today, the execution of Dart script tags 325 document, above any Dart script tags. Today, the execution of Dart script tags
311 is not synchronous in Dartium, so the difference is not noticeable. However, 326 is not synchronous in Dartium, so the difference is not noticeable. However,
312 Dartium that will eventually change and make the timing of script tags execution 327 Dartium that will eventually change and make the timing of script tags execution
313 match how they are in JavaScript. At that point the order of your imports with 328 match how they are in JavaScript. At that point the order of your imports with
314 respect to script tags will be important. Following the practice of putting 329 respect to script tags will be important. Following the practice of putting
315 imports first protects your app from a future breaking change in this respect.</ p> 330 imports first protects your app from a future breaking change in this respect.</ p>
316 <hr /> 331 </div><hr />
317 332
318 <h3 id="polymer_9">Missing href on a <code>&lt;link&gt;</code> tag <a href="#pol ymer_9">#9</a></h3> 333 <div id="polymer_9"><h3>Missing href on a <code>&lt;link&gt;</code> tag <a href= "#polymer_9">#9</a></h3>
319 <p>All <code>&lt;link&gt;</code> tags should have a valid URL to a resource.</p> 334 <p>All <code>&lt;link&gt;</code> tags should have a valid URL to a resource.</p>
320 <hr /> 335 </div><hr />
321 336
322 <h3 id="polymer_10"><code>&lt;element&gt;</code> is deprecated <a href="#polymer _10">#10</a></h3> 337 <div id="polymer_10"><h3><code>&lt;element&gt;</code> is deprecated <a href="#po lymer_10">#10</a></h3>
323 <p>Long ago <code>&lt;polymer-element&gt;</code> used to be called <code>&lt;ele ment&gt;</code>. You probably ran 338 <p>Long ago <code>&lt;polymer-element&gt;</code> used to be called <code>&lt;ele ment&gt;</code>. You probably ran
324 into this error if you were migrating code that was written on a very early 339 into this error if you were migrating code that was written on a very early
325 version of polymer.</p> 340 version of polymer.</p>
326 <hr /> 341 </div><hr />
327 342
328 <h3 id="polymer_11">Definition of a custom element not found <a href="#polymer_1 1">#11</a></h3> 343 <div id="polymer_11"><h3>Definition of a custom element not found <a href="#poly mer_11">#11</a></h3>
329 <p>The polymer build was not able to find the definition of a custom element. Th is 344 <p>The polymer build was not able to find the definition of a custom element. Th is
330 can happen if an element is defined with a <code>&lt;polymer-element&gt;</code> tag, but you are 345 can happen if an element is defined with a <code>&lt;polymer-element&gt;</code> tag, but you are
331 missing an HTML import or the import link is incorrect.</p> 346 missing an HTML import or the import link is incorrect.</p>
332 <p>This warning can also be a false alarm. For instance, when an element is defi ned 347 <p>This warning can also be a false alarm. For instance, when an element is defi ned
333 programatically using <code>document.registerElement</code>. In that case the po lymer build 348 programatically using <code>document.registerElement</code>. In that case the po lymer build
334 will not be able to see the definition and will produce this warning.</p> 349 will not be able to see the definition and will produce this warning.</p>
335 <hr /> 350 </div><hr />
336 351
337 <h3 id="polymer_12">Empty script tag <a href="#polymer_12">#12</a></h3> 352 <div id="polymer_12"><h3>Empty script tag <a href="#polymer_12">#12</a></h3>
338 <p>Script tags should either have a <code>src</code> attribute or a non-empty bo dy.</p> 353 <p>Script tags should either have a <code>src</code> attribute or a non-empty bo dy.</p>
339 <hr /> 354 </div><hr />
340 355
341 <h3 id="polymer_13">Expected Dart mime-type <a href="#polymer_13">#13</a></h3> 356 <div id="polymer_13"><h3>Expected Dart mime-type <a href="#polymer_13">#13</a></ h3>
342 <p>You seem to have a <code>.dart</code> extension on a script tag, but the mime -type 357 <p>You seem to have a <code>.dart</code> extension on a script tag, but the mime -type
343 doesn't match <code>application/dart</code>.</p> 358 doesn't match <code>application/dart</code>.</p>
344 <hr /> 359 </div><hr />
345 360
346 <h3 id="polymer_14">Expected Dart file extension <a href="#polymer_14">#14</a></ h3> 361 <div id="polymer_14"><h3>Expected Dart file extension <a href="#polymer_14">#14< /a></h3>
347 <p>You are using the <code>application/dart</code> mime-type on a script tag, so 362 <p>You are using the <code>application/dart</code> mime-type on a script tag, so
348 the URL to the script source URL should have a <code>.dart</code> extension.</p> 363 the URL to the script source URL should have a <code>.dart</code> extension.</p>
349 <hr /> 364 </div><hr />
350 365
351 <h3 id="polymer_15">Script with both src and inline text <a href="#polymer_15"># 15</a></h3> 366 <div id="polymer_15"><h3>Script with both src and inline text <a href="#polymer_ 15">#15</a></h3>
352 <p>You have a script tag that includes both a <code>src</code> attribute and inl ine script 367 <p>You have a script tag that includes both a <code>src</code> attribute and inl ine script
353 text. You must choose one or the other.</p> 368 text. You must choose one or the other.</p>
354 <hr /> 369 </div><hr />
355 370
356 <h3 id="polymer_16">Incorrect instantiation: missing base tag in instantiation < a href="#polymer_16">#16</a></h3> 371 <div id="polymer_16"><h3>Incorrect instantiation: missing base tag in instantiat ion <a href="#polymer_16">#16</a></h3>
357 <p>When you declare that a custom element extends from a base tag, for example:< /p> 372 <p>When you declare that a custom element extends from a base tag, for example:< /p>
358 <pre><code>&lt;polymer-element name="my-example" extends="ul"&gt; 373 <pre><code>&lt;polymer-element name="my-example" extends="ul"&gt;
359 </code></pre> 374 </code></pre>
360 <p>or:</p> 375 <p>or:</p>
361 <pre><code>&lt;polymer-element name="my-example2" extends="ul"&gt; 376 <pre><code>&lt;polymer-element name="my-example2" extends="ul"&gt;
362 &lt;polymer-element name="my-example" extends="my-example2"&gt; 377 &lt;polymer-element name="my-example" extends="my-example2"&gt;
363 </code></pre> 378 </code></pre>
364 <p>You should instantiate <code>my-example</code> by using this syntax:</p> 379 <p>You should instantiate <code>my-example</code> by using this syntax:</p>
365 <pre><code>&lt;ul is="my-example"&gt; 380 <pre><code>&lt;ul is="my-example"&gt;
366 </code></pre> 381 </code></pre>
367 <p>And not:</p> 382 <p>And not:</p>
368 <pre><code>&lt;my-example&gt; 383 <pre><code>&lt;my-example&gt;
369 </code></pre> 384 </code></pre>
370 <p>Only elements that don't extend from existing HTML elements are created using 385 <p>Only elements that don't extend from existing HTML elements are created using
371 the latter form.</p> 386 the latter form.</p>
372 <p>This is because browsers first create the base element, and then upgrade it t o 387 <p>This is because browsers first create the base element, and then upgrade it t o
373 have the extra functionality of your custom element. In the example above, using 388 have the extra functionality of your custom element. In the example above, using
374 <code>&lt;ul&gt;</code> tells the browser which base type it must create before 389 <code>&lt;ul&gt;</code> tells the browser which base type it must create before
375 doing the upgrade.</p> 390 doing the upgrade.</p>
376 <hr /> 391 </div><hr />
377 392
378 <h3 id="polymer_17">Incorrect instantiation: extra <code>is</code> attribute or missing <code>extends</code> in declaration <a href="#polymer_17">#17</a></h3> 393 <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>
379 <p>Creating a custom element using the syntax:</p> 394 <p>Creating a custom element using the syntax:</p>
380 <pre><code>&lt;ul is="my-example"&gt; 395 <pre><code>&lt;ul is="my-example"&gt;
381 </code></pre> 396 </code></pre>
382 <p>means that the declaration of <code>my-example</code> extends transitively fr om <code>ul</code>. This 397 <p>means that the declaration of <code>my-example</code> extends transitively fr om <code>ul</code>. This
383 error message is shown if the definition of <code>my-example</code> doesn't decl are this 398 error message is shown if the definition of <code>my-example</code> doesn't decl are this
384 extension. It might be that you no longer extend from the base element, in which 399 extension. It might be that you no longer extend from the base element, in which
385 case the fix is to change the instantiation to:</p> 400 case the fix is to change the instantiation to:</p>
386 <pre><code>&lt;my-example&gt; 401 <pre><code>&lt;my-example&gt;
387 </code></pre> 402 </code></pre>
388 <p>Another possibility is that the declaration needs to be fixed to include the 403 <p>Another possibility is that the declaration needs to be fixed to include the
389 <code>extends</code> attribute, for example:</p> 404 <code>extends</code> attribute, for example:</p>
390 <pre><code>&lt;polymer-element name="my-example" extends="ul"&gt; 405 <pre><code>&lt;polymer-element name="my-example" extends="ul"&gt;
391 </code></pre> 406 </code></pre>
392 <hr /> 407 </div><hr />
393 408
394 <h3 id="polymer_18">Incorrect instantiation: base tag seems wrong <a href="#poly mer_18">#18</a></h3> 409 <div id="polymer_18"><h3>Incorrect instantiation: base tag seems wrong <a href=" #polymer_18">#18</a></h3>
395 <p>It seems you have a declaration like:</p> 410 <p>It seems you have a declaration like:</p>
396 <pre><code>&lt;polymer-element name="my-example" extends="div"&gt; 411 <pre><code>&lt;polymer-element name="my-example" extends="div"&gt;
397 </code></pre> 412 </code></pre>
398 <p>but an instantiation like:</p> 413 <p>but an instantiation like:</p>
399 <pre><code>&lt;span is="my-example"&gt; 414 <pre><code>&lt;span is="my-example"&gt;
400 </code></pre> 415 </code></pre>
401 <p>Both the declaration and the instantiation need to match on the base type. So 416 <p>Both the declaration and the instantiation need to match on the base type. So
402 either the instantiation needs to be fixed to be more like:</p> 417 either the instantiation needs to be fixed to be more like:</p>
403 <pre><code>&lt;span is="my-example"&gt; 418 <pre><code>&lt;span is="my-example"&gt;
404 </code></pre> 419 </code></pre>
405 <p>or the declaration should be fixed to be like:</p> 420 <p>or the declaration should be fixed to be like:</p>
406 <pre><code>&lt;polymer-element name="my-example" extends="span"&gt; 421 <pre><code>&lt;polymer-element name="my-example" extends="span"&gt;
407 </code></pre> 422 </code></pre>
408 <hr /> 423 </div><hr />
409 424
410 <h3 id="polymer_19">No dashes allowed in custom attributes <a href="#polymer_19" >#19</a></h3> 425 <div id="polymer_19"><h3>No dashes allowed in custom attributes <a href="#polyme r_19">#19</a></h3>
411 <p>Polymer used to recognize attributes with dashes like <code>my-name</code> an d convert them 426 <p>Polymer used to recognize attributes with dashes like <code>my-name</code> an d convert them
412 to match properties where dashes were removed, and words follow the camelCase 427 to match properties where dashes were removed, and words follow the camelCase
413 style (for example <code>myName</code>). This feature is no longer available. No w simply 428 style (for example <code>myName</code>). This feature is no longer available. No w simply
414 use the same name as the property.</p> 429 use the same name as the property.</p>
415 <p>Because HTML attributes are case-insensitive, you can also write the name of 430 <p>Because HTML attributes are case-insensitive, you can also write the name of
416 your property entirely in lowercase. Just be sure that your custom-elements 431 your property entirely in lowercase. Just be sure that your custom-elements
417 don't declare two properties with the same name but different capitalization.</p > 432 don't declare two properties with the same name but different capitalization.</p >
418 <hr /> 433 </div><hr />
419 434
420 <h3 id="polymer_20">Event handlers not supported here <a href="#polymer_20">#20< /a></h3> 435 <div id="polymer_20"><h3>Event handlers not supported here <a href="#polymer_20" >#20</a></h3>
421 <p>Bindings of the form <code>{{ }}</code> are supported inside <code>&lt;templa te&gt;</code> nodes, even outside 436 <p>Bindings of the form <code>{{ }}</code> are supported inside <code>&lt;templa te&gt;</code> nodes, even outside
422 of <code>&lt;polymer-element&gt;</code> declarations. However, those bindings on ly support binding 437 of <code>&lt;polymer-element&gt;</code> declarations. However, those bindings on ly support binding
423 values into the content of a node or an attribute.</p> 438 values into the content of a node or an attribute.</p>
424 <p>Inline event handlers of the form <code>on-click="{{method}}"</code> are a sp ecial feature 439 <p>Inline event handlers of the form <code>on-click="{{method}}"</code> are a sp ecial feature
425 of polymer elements, so they are only supported inside <code>&lt;polymer-element &gt;</code> 440 of polymer elements, so they are only supported inside <code>&lt;polymer-element &gt;</code>
426 definitions.</p> 441 definitions.</p>
427 <hr /> 442 </div><hr />
428 443
429 <h3 id="polymer_21">No expressions allowed in event handler bindings <a href="#p olymer_21">#21</a></h3> 444 <div id="polymer_21"><h3>No expressions allowed in event handler bindings <a hre f="#polymer_21">#21</a></h3>
430 <p>Unlike data bindings, event handler bindings of the form <code>on-click="{{me thod}}"</code> 445 <p>Unlike data bindings, event handler bindings of the form <code>on-click="{{me thod}}"</code>
431 are not evaluated as expressions. They are meant to just contain a simple name 446 are not evaluated as expressions. They are meant to just contain a simple name
432 that resolves to a method in your polymer element's class definition.</p> 447 that resolves to a method in your polymer element's class definition.</p>
433 <hr /> 448 </div><hr />
434 449
435 <h3 id="polymer_22">Nested polymer element definitions not allowed <a href="#pol ymer_22">#22</a></h3> 450 <div id="polymer_22"><h3>Nested polymer element definitions not allowed <a href= "#polymer_22">#22</a></h3>
436 <p>Because custom element names are global, there is no need to have a 451 <p>Because custom element names are global, there is no need to have a
437 <code>&lt;polymer-element&gt;</code> definition nested within a <code>&lt;polyme r-element&gt;</code>. If you have 452 <code>&lt;polymer-element&gt;</code> definition nested within a <code>&lt;polyme r-element&gt;</code>. If you have
438 a definition inside another, move the second definition out.</p> 453 a definition inside another, move the second definition out.</p>
439 <p>You might see this error if you have an HTML import within a polymer element. 454 <p>You might see this error if you have an HTML import within a polymer element.
440 You should be able to move the import out of the element definition.</p> 455 You should be able to move the import out of the element definition.</p>
441 <hr /> 456 </div><hr />
442 457
443 <h3 id="polymer_23">Polymer element definitions without a name <a href="#polymer _23">#23</a></h3> 458 <div id="polymer_23"><h3>Polymer element definitions without a name <a href="#po lymer_23">#23</a></h3>
444 <p>Polymer element definitions must have a name. You can include a name by using 459 <p>Polymer element definitions must have a name. You can include a name by using
445 the <code>name</code> attribute in <code>&lt;polymer-element&gt;</code> for exam ple:</p> 460 the <code>name</code> attribute in <code>&lt;polymer-element&gt;</code> for exam ple:</p>
446 <pre><code>&lt;polymer-element name="my-example"&gt; 461 <pre><code>&lt;polymer-element name="my-example"&gt;
447 </code></pre> 462 </code></pre>
448 <hr /> 463 </div><hr />
449 464
450 <h3 id="polymer_24">Custom element name missing a dash <a href="#polymer_24">#24 </a></h3> 465 <div id="polymer_24"><h3>Custom element name missing a dash <a href="#polymer_24 ">#24</a></h3>
451 <p>Custom element names must have a dash (<code>-</code>) and can't be any of th e following 466 <p>Custom element names must have a dash (<code>-</code>) and can't be any of th e following
452 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> 467 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>
453 <hr /> 468 </div><hr />
454 469
455 <h3 id="polymer_25">Error while inlining an import <a href="#polymer_25">#25</a> </h3> 470 <div id="polymer_25"><h3>Error while inlining an import <a href="#polymer_25">#2 5</a></h3>
456 <p>An error occurred while inlining an import in the polymer build. This is ofte n 471 <p>An error occurred while inlining an import in the polymer build. This is ofte n
457 the result of a broken HTML import.</p> 472 the result of a broken HTML import.</p>
458 <hr /> 473 </div><hr />
459 474
460 <h3 id="polymer_26">Error while inlining a stylesheet <a href="#polymer_26">#26< /a></h3> 475 <div id="polymer_26"><h3>Error while inlining a stylesheet <a href="#polymer_26" >#26</a></h3>
461 <p>An error occurred while inlining a stylesheet in the polymer build. This is 476 <p>An error occurred while inlining a stylesheet in the polymer build. This is
462 often the result of a broken URL in a <code>&lt;link rel="stylesheet" href="..." &gt;</code>.</p> 477 often the result of a broken URL in a <code>&lt;link rel="stylesheet" href="..." &gt;</code>.</p>
463 <hr /> 478 </div><hr />
464 479
465 <h3 id="polymer_27">URL to a script file might be incorrect <a href="#polymer_27 ">#27</a></h3> 480 <div id="polymer_27"><h3>URL to a script file might be incorrect <a href="#polym er_27">#27</a></h3>
466 <p>An error occurred trying to read a script tag on a given URL. This is often t he 481 <p>An error occurred trying to read a script tag on a given URL. This is often t he
467 result of a broken URL in a <code>&lt;script src="..."&gt;</code>.</p> 482 result of a broken URL in a <code>&lt;script src="..."&gt;</code>.</p>
468 <hr /> 483 </div><hr />
469 484
470 <h3 id="polymer_28">Attribute missing "_" prefix <a href="#polymer_28">#28</a></ h3> 485 <div id="polymer_28"><h3>Attribute missing "_" prefix <a href="#polymer_28">#28< /a></h3>
471 <p>Not all browsers support bindings to certain attributes, especially URL 486 <p>Not all browsers support bindings to certain attributes, especially URL
472 attributes. Some browsers might sanitize attributes and result in an 487 attributes. Some browsers might sanitize attributes and result in an
473 incorrect value. For this reason polymer provides a special set of attributes 488 incorrect value. For this reason polymer provides a special set of attributes
474 that let you bypass any browser internal attribute validation. The name of the 489 that let you bypass any browser internal attribute validation. The name of the
475 attribute is the same as the original attribute, but with a leading underscore. 490 attribute is the same as the original attribute, but with a leading underscore.
476 For example, instead of writing:</p> 491 For example, instead of writing:</p>
477 <pre><code>&lt;img src="{{binding}}"&gt; 492 <pre><code>&lt;img src="{{binding}}"&gt;
478 </code></pre> 493 </code></pre>
479 <p>you can write:</p> 494 <p>you can write:</p>
480 <pre><code>&lt;img _src="{{binding}}"&gt; 495 <pre><code>&lt;img _src="{{binding}}"&gt;
481 </code></pre> 496 </code></pre>
482 <p>For more information, see <a href="http://goo.gl/5av8cU">http://goo.gl/5av8cU </a>.</p> 497 <p>For more information, see <a href="http://goo.gl/5av8cU">http://goo.gl/5av8cU </a>.</p>
483 <hr /> 498 </div><hr />
484 499
485 <h3 id="polymer_29">Attribute with extra "_" prefix <a href="#polymer_29">#29</a ></h3> 500 <div id="polymer_29"><h3>Attribute with extra "_" prefix <a href="#polymer_29"># 29</a></h3>
486 <p>A special attribute exists to support bindings on URL attributes. For example , 501 <p>A special attribute exists to support bindings on URL attributes. For example ,
487 this correctly binds the <code>src</code> attribute in an image:</p> 502 this correctly binds the <code>src</code> attribute in an image:</p>
488 <pre><code>&lt;img _src="{{binding}}"&gt; 503 <pre><code>&lt;img _src="{{binding}}"&gt;
489 </code></pre> 504 </code></pre>
490 <p>However, this special <code>_src</code> attribute is only available for bindi ngs. If you 505 <p>However, this special <code>_src</code> attribute is only available for bindi ngs. If you
491 just have a URL, use the normal <code>src</code> attribute instead.</p> 506 just have a URL, use the normal <code>src</code> attribute instead.</p>
492 <hr /> 507 </div><hr />
493 508
494 <h3 id="polymer_30">Internal error: don't know how to include a URL <a href="#po lymer_30">#30</a></h3> 509 <div id="polymer_30"><h3>Internal error: don't know how to include a URL <a href ="#polymer_30">#30</a></h3>
495 <p>Sorry, you just ran into a bug in the polymer transformer code. Please file a 510 <p>Sorry, you just ran into a bug in the polymer transformer code. Please file a
496 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if possible, some example code that 511 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if possible, some example code that
497 can help the team reproduce the issue.</p> 512 can help the team reproduce the issue.</p>
498 <hr /> 513 </div><hr />
499 514
500 <h3 id="polymer_31">Internal error: phases run out of order <a href="#polymer_31 ">#31</a></h3> 515 <div id="polymer_31"><h3>Internal error: phases run out of order <a href="#polym er_31">#31</a></h3>
501 <p>Sorry, you just ran into a bug in the polymer transformer code. Please file a 516 <p>Sorry, you just ran into a bug in the polymer transformer code. Please file a
502 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if possible, some example code that 517 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if possible, some example code that
503 can help the team reproduce the issue.</p> 518 can help the team reproduce the issue.</p>
504 <hr /> 519 </div><hr />
505 520
506 <h3 id="polymer_32"><code>@CustomTag</code> used on a private class <a href="#po lymer_32">#32</a></h3> 521 <div id="polymer_32"><h3><code>@CustomTag</code> used on a private class <a href ="#polymer_32">#32</a></h3>
507 <p>The <code>@CustomTag</code> annotation is currently only supported on public classes. If 522 <p>The <code>@CustomTag</code> annotation is currently only supported on public classes. If
508 you need to register a custom element whose implementation is a private class 523 you need to register a custom element whose implementation is a private class
509 (that is, a class whose name starts with <code>_</code>), you can still do so by invoking 524 (that is, a class whose name starts with <code>_</code>), you can still do so by invoking
510 <code>Polymer.register</code> within a public method marked with <code>@initMeth od</code>.</p> 525 <code>Polymer.register</code> within a public method marked with <code>@initMeth od</code>.</p>
511 <hr /> 526 </div><hr />
512 527
513 <h3 id="polymer_33"><code>@initMethod</code> is on a private function <a href="# polymer_33">#33</a></h3> 528 <div id="polymer_33"><h3><code>@initMethod</code> is on a private function <a hr ef="#polymer_33">#33</a></h3>
514 <p>The <code>@initMethod</code> annotation is currently only supported on public top-level 529 <p>The <code>@initMethod</code> annotation is currently only supported on public top-level
515 functions.</p> 530 functions.</p>
516 <hr /> 531 </div><hr />
517 532
518 <h3 id="polymer_34">Missing argument in annotation <a href="#polymer_34">#34</a> </h3> 533 <div id="polymer_34"><h3>Missing argument in annotation <a href="#polymer_34">#3 4</a></h3>
519 <p>The annotation expects one argument, but the argument was not provided.</p> 534 <p>The annotation expects one argument, but the argument was not provided.</p>
520 <hr /> 535 </div><hr />
521 536
522 <h3 id="polymer_35">Invalid argument in annotation <a href="#polymer_35">#35</a> </h3> 537 <div id="polymer_35"><h3>Invalid argument in annotation <a href="#polymer_35">#3 5</a></h3>
523 <p>The polymer transformer was not able to extract a constant value for the 538 <p>The polymer transformer was not able to extract a constant value for the
524 annotation argument. This can happen if your code is currently in a state that 539 annotation argument. This can happen if your code is currently in a state that
525 can't be analyzed (for example, it has parse errors) or if the expression passed 540 can't be analyzed (for example, it has parse errors) or if the expression passed
526 as an argument is invalid (for example, it is not a compile-time constant).</p> 541 as an argument is invalid (for example, it is not a compile-time constant).</p>
527 <hr /> 542 </div><hr />
528 543
529 <h3 id="polymer_36">No polymer initializers found <a href="#polymer_36">#36</a>< /h3> 544 <div id="polymer_36"><h3>No polymer initializers found <a href="#polymer_36">#36 </a></h3>
530 <p>No polymer initializers were found. Make sure to either 545 <p>No polymer initializers were found. Make sure to either
531 annotate your polymer elements with @CustomTag or include a 546 annotate your polymer elements with @CustomTag or include a
532 top level method annotated with @initMethod that registers your 547 top level method annotated with @initMethod that registers your
533 elements. Both annotations are defined in the polymer library ( 548 elements. Both annotations are defined in the polymer library (
534 package:polymer/polymer.dart).</p> 549 package:polymer/polymer.dart).</p>
535 <hr /> 550 </div><hr />
536 551
537 <h3 id="polymer_37">Event bindings with @ are no longer supported <a href="#poly mer_37">#37</a></h3> 552 <div id="polymer_37"><h3>Event bindings with @ are no longer supported <a href=" #polymer_37">#37</a></h3>
538 <p>For a while there was an undocumented feature that allowed users to include 553 <p>For a while there was an undocumented feature that allowed users to include
539 expressions in event bindings using the <code>@</code> prefix, for example:</p> 554 expressions in event bindings using the <code>@</code> prefix, for example:</p>
540 <pre><code>&lt;div on-click="{{@a.b.c}}"&gt; 555 <pre><code>&lt;div on-click="{{@a.b.c}}"&gt;
541 556
542 </code></pre> 557 </code></pre>
543 <p>This feature is no longer supported.</p> 558 <p>This feature is no longer supported.</p>
544 <hr /> 559 </div><hr />
545 560
546 <h3 id="polymer_38">Private symbol in event handler <a href="#polymer_38">#38</a ></h3> 561 <div id="polymer_38"><h3>Private symbol in event handler <a href="#polymer_38"># 38</a></h3>
547 <p>Currently private members can't be used in event handler bindings. So you can 't 562 <p>Currently private members can't be used in event handler bindings. So you can 't
548 write:</p> 563 write:</p>
549 <pre><code>&lt;div on-click="{{_method}}"&gt; 564 <pre><code>&lt;div on-click="{{_method}}"&gt;
550 </code></pre> 565 </code></pre>
551 <p>This restriction might be removed in the future, but for now, you need to mak e 566 <p>This restriction might be removed in the future, but for now, you need to mak e
552 your event handlers public.</p> 567 your event handlers public.</p>
553 <hr /> 568 </div><hr />
554 569
555 <h3 id="polymer_39">Private symbol in binding expression <a href="#polymer_39"># 39</a></h3> 570 <div id="polymer_39"><h3>Private symbol in binding expression <a href="#polymer_ 39">#39</a></h3>
556 <p>Private members can't be used in binding expressions. For example, you can't 571 <p>Private members can't be used in binding expressions. For example, you can't
557 write:</p> 572 write:</p>
558 <pre><code>&lt;div&gt;{{a.b._c}}&lt;/div&gt; 573 <pre><code>&lt;div&gt;{{a.b._c}}&lt;/div&gt;
559 </code></pre> 574 </code></pre>
560 <hr /> 575 </div><hr />
561 576
562 <h3 id="polymer_40">A warning was found while parsing the HTML document <a href= "#polymer_40">#40</a></h3> 577 <div id="polymer_40"><h3>A warning was found while parsing the HTML document <a href="#polymer_40">#40</a></h3>
563 <p>The polymer transformer uses a parser that implements the HTML5 spec 578 <p>The polymer transformer uses a parser that implements the HTML5 spec
564 (<code>html5lib</code>). This message reports a 579 (<code>html5lib</code>). This message reports a
565 warning that the parser detected.</p> 580 warning that the parser detected.</p>
566 <hr /> 581 </div><hr />
567 582
568 <h3 id="polymer_41">Possible flash of unstyled content <a href="#polymer_41">#41 </a></h3> 583 <div id="polymer_41"><h3>Possible flash of unstyled content <a href="#polymer_41 ">#41</a></h3>
569 <p>Custom element found in document body without an "unresolved" attribute on it or 584 <p>Custom element found in document body without an "unresolved" attribute on it or
570 one of its parents. This means your app probably has a flash of unstyled content 585 one of its parents. This means your app probably has a flash of unstyled content
571 before it finishes loading. See <a href="http://goo.gl/iN03Pj">http://goo.gl/iN0 3Pj</a> for more info.</p> 586 before it finishes loading. See <a href="http://goo.gl/iN03Pj">http://goo.gl/iN0 3Pj</a> for more info.</p>
572 <hr /></body> 587 </div><hr /></body>
573 </html> 588 </html>
OLDNEW
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698