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 } |
| 37 |
| 38 h1 { |
| 39 font-family: Montserrat, sans-serif; |
| 40 box-sizing: border-box; |
| 41 color: rgb(72, 72, 72); |
| 42 display: block; |
| 43 font-style: normal; |
| 44 font-variant: normal; |
| 45 font-weight: normal; |
| 46 } |
| 47 |
| 48 h2 { |
| 49 font-family: Montserrat, sans-serif; |
| 50 box-sizing: border-box; |
| 51 color: rgb(72, 72, 72); |
| 52 display: block; |
| 53 font-style: normal; |
| 54 font-variant: normal; |
| 55 font-weight: normal; |
| 56 } |
| 57 |
| 58 pre { |
| 59 display: block; |
| 60 padding: 9.5px; |
| 61 margin: 0 0 10px; |
| 62 line-height: 1.42857143; |
| 63 color: #333; |
| 64 word-break: break-all; |
| 65 word-wrap: break-word; |
| 66 background-color: #f5f5f5; |
| 67 border: 1px solid #ccc; |
| 68 border-radius: 4px; |
| 69 } |
| 70 |
| 71 code { |
| 72 font-family: Menlo,Monaco,Consolas,"Courier New",monospace; |
| 73 box-sizing: border-box; |
| 74 padding: 0; |
| 75 font-size: 90%; |
| 76 color: #0084c5; |
| 77 white-space: nowrap; |
| 78 border-radius: 4px; |
| 79 background-color: #f9f2f4; |
| 80 } |
| 81 |
| 82 pre > code { |
| 83 white-space: inherit; |
| 84 } |
| 85 |
| 86 a { |
| 87 color: rgb(42, 100, 150); |
| 88 } |
| 89 |
| 90 h2 > a { |
| 91 display: none; |
| 92 font-size: 0.8em; |
| 93 } |
| 94 |
| 95 h2:hover > a { |
| 96 display: inline; |
| 97 } |
| 98 </style> |
| 99 <body> |
| 100 <h1>Messages from package <code>code_transformers</code></h1> |
| 101 <hr /> |
| 102 |
| 103 <h2 id="msg_code_transformers_1">Absolute paths not allowed <a href="#msg_code_t
ransformers_1">#1</a></h2> |
| 104 <p>The transformers processing your code were trying to resolve a URL and identi
fy |
| 105 a file that they correspond to. Currently only relative paths can be resolved.</
p> |
| 106 <hr /> |
| 107 |
| 108 <h2 id="msg_code_transformers_2">Invalid url to reach another package <a href="#
msg_code_transformers_2">#2</a></h2> |
| 109 <p>To reach an asset that belongs to another package, we use <code>package:</cod
e> URLs in |
| 110 Dart code, but in any other language (like HTML or CSS) we use relative URLs.</p
> |
| 111 <p>These are the rules you must follow to write URLs that refer to files in othe
r |
| 112 packages:</p><ul><li> |
| 113 <p>if the file containing the relative URL is an entrypoint under <code>web</cod
e>, use |
| 114 <code>packages/package_name/path_to_file</code></p></li><li> |
| 115 <p>if the file containing the URL is under <code>web</code>, but on a different
directory |
| 116 than your entrypoint, walk out to the same level as the entrypoint first, |
| 117 then enter the <code>packages</code> folder.</p> |
| 118 <p><strong>Note</strong>: this means that if you have two entrypoints including
this file, |
| 119 either both entrypoints have to live in the same directory, or you need to |
| 120 move the file to the <code>lib</code> folder.</p></li><li> |
| 121 <p>if the file containing the URL lives under <code>lib</code>, walk up as many
levels as |
| 122 directories you have + 1. This is because code in <code>lib/a/b</code> is loaded
from |
| 123 <code>packages/package_name/a/b</code>.</p></li></ul> |
| 124 <p>The rules are easier to follow if you know how the code is layed out for |
| 125 Dartium before you build, and how it is layed out after you build it with <code>
pub |
| 126 build</code>. Consider the following example:</p> |
| 127 <p> package a</p> |
| 128 <pre><code> lib/ |
| 129 '- a1.html |
| 130 |
| 131 web/ |
| 132 '- a2.html |
| 133 </code></pre> |
| 134 <p> package b</p> |
| 135 <pre><code> lib/ |
| 136 |- b1.html |
| 137 '- b2/ |
| 138 '- b3.html |
| 139 </code></pre> |
| 140 <p> package c</p> |
| 141 <pre><code> lib/ |
| 142 '- c3.html |
| 143 |
| 144 web/ |
| 145 |- index.html |
| 146 |- index.dart |
| 147 |- c1/ |
| 148 '- c2.html |
| 149 </code></pre> |
| 150 <p>If your app is package <code>c</code>, you'll notice that in your file system
there is a |
| 151 packages folder generated in the web folder, like this:</p> |
| 152 <pre><code> web/ |
| 153 |- index.html |
| 154 |- index.dart |
| 155 |- c1/ |
| 156 | '- c2.html |
| 157 '- packages/ |
| 158 |- a/ |
| 159 | '- a1.html |
| 160 |- b/ |
| 161 | |- b1.html |
| 162 | '- b2/ |
| 163 | '- b3.html |
| 164 '- c/ |
| 165 '- c3.html |
| 166 </code></pre> |
| 167 <p>Note that there is no <code>lib</code> folder under the <code>packages</code>
folder. When you load |
| 168 <code>index.html</code> in Dartium, it will infer that the package root is under |
| 169 <code>web/packages/</code>.</p> |
| 170 <p>If you need to refer to any file in other packages from <code>index.html</cod
e>, you can |
| 171 simply do <code>packages/package_name/path_to_file</code>. For example |
| 172 <code>packages/b/b2/b3.html</code>. From <code>index.html</code> you can also re
fer to files under the |
| 173 web folder of the same package using a simple relative URL, like <code>c1/c2.htm
l</code>.</p> |
| 174 <p>However, if you want to load <code>a1.html</code> from <code>c2.html</code>,
you need to reach out to |
| 175 the packages folder that lives next to your entrypoint and then load the file |
| 176 from there, for example <code>../packages/a/a1.html</code>. Because pub generate
s symlinks |
| 177 to the packages folder also under c1, you may be tempted to write |
| 178 <code>packages/a/a1.html</code>, but that is incorrect - it would yield a canoni
calization |
| 179 error (see more below).</p> |
| 180 <p>If you want to load a file from the lib folder of your own package, you |
| 181 should also use a package URL. For example, <code>packages/c/c3.html</code> and
not |
| 182 <code>../lib/c3.html</code>. This will allow you to write code in <code>lib</cod
e> in a way that it |
| 183 can be used within and outside your package without making any changes to it.</p
> |
| 184 <p>Because any time you reach inside a <code>lib/</code> folder you do so using
a <code>packages/</code> |
| 185 URL, the rules for reaching into other files in other packages are always |
| 186 consistent: go up to exit the <code>packages</code> folder and go back inside to
the file you |
| 187 are looking for. For example, to reach <code>a1.html</code> from <code>b3.html<
/code> you need to |
| 188 write <code>../../../packages/a/a1.html</code>.</p> |
| 189 <p>The motivation behind all these rules is that we would like to have URLs that |
| 190 work under many scenarios at once:</p><ul><li> |
| 191 <p>They need to work in Dartium without any code transformation: resolving the |
| 192 path in the context of a simple HTTP server, or using <code>file:///</code> URLs
, |
| 193 should yield a valid path to assets. Since pub already creates a <code>packages<
/code> |
| 194 directory next to entrypoints of your application, we assume we can use it.</p><
/li><li> |
| 195 <p>They need to be canonical. To take advantage of caching, multiple URLs |
| 196 reaching the same asset should resolve to the same absolute URL.</p> |
| 197 <p>Also, in projects that use HTML imports (like polymer) we make sure that if |
| 198 you reach a library twice, once with Dart imports, and a second time with |
| 199 HTML imports, then they are correctly resolved to be the same library. Our |
| 200 rules are designed to allow tools to ensure this.</p> |
| 201 <p>For example, consider you have an import might like:</p> |
| 202 <pre><code><link rel=import href=packages/a/a.html> |
| 203 </code></pre> |
| 204 <p>where a.html has <code><script type="application/dart" src="a.dart"></c
ode>. If your |
| 205 Dart entrypoint also loads <code>"package:a/a.dart"</code>, then we need to mak
e sure |
| 206 that both versions of <code>a.dart</code> are loaded from the same URL. Otherwis
e, you |
| 207 may see errors at runtime like: <code>A is not a subtype of A</code>, which can
be |
| 208 extremely confusing.</p> |
| 209 <p>When you follow the rules above, our tools can detect the pattern in the |
| 210 HTML-import URL containing <code>packages/</code> and canonicalize the import |
| 211 by converting <code>packages/a/a.dart</code> into <code>package:a/a.dart</code>
under the hood.</p></li><li> |
| 212 <p>They need to continue to be valid after applications are built. |
| 213 Technically this could be done automatically with pub transformers, but to |
| 214 make sure that code works also in Dartium with a simple HTTP Server, |
| 215 existing transformers do not fix URLs, they just detect inconsistencies and |
| 216 produce an error message like this one, instead.</p></li></ul> |
| 217 <hr /> |
| 218 |
| 219 <h2 id="msg_code_transformers_3">Incomplete import to asset in another package <
a href="#msg_code_transformers_3">#3</a></h2> |
| 220 <p>Currently we require that URLs that refer to assets in other packages to |
| 221 explicitly mention the <code>packages/</code> folder. In the future we might rem
ove this |
| 222 requiremnt, but for now we ask that you use a canonical URL form for it.</p> |
| 223 <p>For example, if you have <code>packages/a/a.html</code> using an HTML import
to |
| 224 <code>packages/b/b.html</code>, you could technically just write <code>../b/b.ht
ml</code>, but we |
| 225 require that you write <code>../../packages/b/b.html</code>. |
| 226 See <a href="http://dartbug.com/15797">issue 15797</a>.</p> |
| 227 <hr /><h1>Messages from package <code>observe</code></h1> |
| 228 <hr /> |
| 229 |
| 230 <h2 id="msg_observe_1"><code>@observable</code> on a library is not supported. <
a href="#msg_observe_1">#1</a></h2> |
| 231 <p>Long ago <code>@observable</code> was supported on classes, libraries, and ev
en top-level |
| 232 declarations and static fields. Today, the annotation has no effect on these |
| 233 elements. Only instance fields on <code>Observable</code> classes are supported,
and you |
| 234 must explicitly opt-in on each field you wish to make observable. </p> |
| 235 <hr /> |
| 236 |
| 237 <h2 id="msg_observe_2"><code>@observable</code> on top-level fields is not suppo
rted. <a href="#msg_observe_2">#2</a></h2> |
| 238 <p>Long ago <code>@observable</code> was supported on classes, libraries, and ev
en top-level |
| 239 declarations and static fields. Today, the annotation has no effect on these |
| 240 elements. Only instance fields on <code>Observable</code> classes are supported,
and you |
| 241 must explicitly opt-in on each field you wish to make observable. </p> |
| 242 <hr /> |
| 243 |
| 244 <h2 id="msg_observe_3"><code>@observable</code> on classes is not supported. <a
href="#msg_observe_3">#3</a></h2> |
| 245 <p>Long ago <code>@observable</code> was supported on classes, libraries, and ev
en top-level |
| 246 declarations and static fields. Today, the annotation has no effect on these |
| 247 elements. Only instance fields on <code>Observable</code> classes are supported,
and you |
| 248 must explicitly opt-in on each field you wish to make observable. </p> |
| 249 <hr /> |
| 250 |
| 251 <h2 id="msg_observe_4"><code>@observable</code> on static fields is not supporte
d. <a href="#msg_observe_4">#4</a></h2> |
| 252 <p>Long ago <code>@observable</code> was supported on classes, libraries, and ev
en top-level |
| 253 declarations and static fields. Today, the annotation has no effect on these |
| 254 elements. Only instance fields on <code>Observable</code> classes are supported,
and you |
| 255 must explicitly opt-in on each field you wish to make observable. </p> |
| 256 <hr /> |
| 257 |
| 258 <h2 id="msg_observe_5"><code>@observable</code> must be used on a class that imp
lements <code>Observable</code>. <a href="#msg_observe_5">#5</a></h2> |
| 259 <p>Long ago <code>@observable</code> was supported on classes, libraries, and ev
en top-level |
| 260 declarations and static fields. Today, the annotation has no effect on these |
| 261 elements. Only instance fields on <code>Observable</code> classes are supported,
and you |
| 262 must explicitly opt-in on each field you wish to make observable. </p> |
| 263 <hr /><h1>Messages from package <code>polymer</code></h1> |
| 264 <hr /> |
| 265 |
| 266 <h2 id="msg_polymer_1">Import not found <a href="#msg_polymer_1">#1</a></h2> |
| 267 <p>An HTML import seems to be broken. This could be because the file doesn't exi
st |
| 268 or because the link URL is incorrect.</p> |
| 269 <hr /> |
| 270 |
| 271 <h2 id="msg_polymer_2">Duplicate definition <a href="#msg_polymer_2">#2</a></h2> |
| 272 <p>Custom element names are global and can only be defined once. Some common |
| 273 reasons why you might get two definitions:</p><ul><li>There are two different el
ements defined with the same name.</li><li> |
| 274 <p>A single HTML file defining an element, is imported from two different |
| 275 URLs.</p></li></ul> |
| 276 <hr /> |
| 277 |
| 278 <h2 id="msg_polymer_3">Missing import to polymer.html <a href="#msg_polymer_3">#
3</a></h2> |
| 279 <p>Starting with polymer 0.11.0 we require that each file that uses the definiti
on |
| 280 of polymer-element has to import it either directly or transitively.</p> |
| 281 <hr /> |
| 282 |
| 283 <h2 id="msg_polymer_4">Can't use imports inside <polymer-element> <a href="#m
sg_polymer_4">#4</a></h2> |
| 284 <p>HTML imports are expected on the top of each document, outside of any |
| 285 polymer-element definitions. The polymer build process combines all your HTML |
| 286 files together so you can deploy a single HTML file with your application. This |
| 287 build process will ignore imports that appear to be in the wrong location.</p> |
| 288 <hr /> |
| 289 |
| 290 <h2 id="msg_polymer_5">Missing init.dart <a href="#msg_polymer_5">#5</a></h2> |
| 291 <p>We determined that your application entry point didn't have any Dart script |
| 292 tags, and hence, it's missing some initialization needed for polymer.dart.</p> |
| 293 <hr /> |
| 294 |
| 295 <h2 id="msg_polymer_6">No script tags with experimental bootstrap. <a href="#msg
_polymer_6">#6</a></h2> |
| 296 <p>This experimental feature is no longer supported.</p> |
| 297 <hr /> |
| 298 |
| 299 <h2 id="msg_polymer_7">Single tag per document <a href="#msg_polymer_7">#7</a></
h2> |
| 300 <p>Dartium currently limits to have a single script tag per document. Any |
| 301 additional script tags might be ignored or result in an error. This will |
| 302 likely change in the future, but for now, we recommend that you combine the |
| 303 script tags together into a single Dart library.</p> |
| 304 <hr /> |
| 305 |
| 306 <h2 id="msg_polymer_8">Imports before script tags <a href="#msg_polymer_8">#8</a
></h2> |
| 307 <p>It is good practice to put all your HTML imports at the beginning of the |
| 308 document, above any Dart script tags. Today, the execution of Dart script tags |
| 309 is not synchronous in Dartium, so the difference is not noticeable. However, we |
| 310 are planning changes in Dartium that will eventually make the timing of script |
| 311 tags execution match how they are in Javascript. At that point the order of your |
| 312 imports with respect to script tags will be important. Following the practice of |
| 313 putting imports first protects your app from a future breaking change in this |
| 314 respect.</p> |
| 315 <hr /> |
| 316 |
| 317 <h2 id="msg_polymer_9">Missing href on a <code><link></code> tag <a href="
#msg_polymer_9">#9</a></h2> |
| 318 <p>All <code><link></code> tags should have a valid URL to a resource.</p> |
| 319 <hr /> |
| 320 |
| 321 <h2 id="msg_polymer_10"><code><element></code> is deprecated <a href="#msg
_polymer_10">#10</a></h2> |
| 322 <p>Long ago <code><polymer-element></code> used to be called <code><ele
ment></code>. You probably ran |
| 323 into this error if you were migrating code that was written on a very early |
| 324 version of polymer.</p> |
| 325 <hr /> |
| 326 |
| 327 <h2 id="msg_polymer_11">Definition of a custom element not found <a href="#msg_p
olymer_11">#11</a></h2> |
| 328 <p>The polymer build was not able to find the definition of a custom element. Th
is |
| 329 can happen if an element is defined with a <code><polymer-element></code>
tag, but you are |
| 330 missing an HTML import or the import link is incorrect.</p> |
| 331 <p>This warning can also be a false alarm. For instance, when an element is defi
ned |
| 332 programatically using <code>document.registerElement</code>. In that case the po
lymer build |
| 333 will not be able to see the definition and will produce this warning.</p> |
| 334 <hr /> |
| 335 |
| 336 <h2 id="msg_polymer_12">Empty script tag <a href="#msg_polymer_12">#12</a></h2> |
| 337 <p>Script tags should either have a <code>src</code> attribute or a non-empty bo
dy.</p> |
| 338 <hr /> |
| 339 |
| 340 <h2 id="msg_polymer_13">Expected Dart mime-type <a href="#msg_polymer_13">#13</a
></h2> |
| 341 <p>You seem to have a <code>.dart</code> extension on a script tag, but the mime
-type |
| 342 doesn't match <code>application/dart</code>.</p> |
| 343 <hr /> |
| 344 |
| 345 <h2 id="msg_polymer_14">Expected Dart file extension <a href="#msg_polymer_14">#
14</a></h2> |
| 346 <p>You are using the <code>application/dart</code> mime-type on a script tag, so
we expected |
| 347 the URL to the script source URL to have a <code>.dart</code> extension, but it
doesn't.</p> |
| 348 <hr /> |
| 349 |
| 350 <h2 id="msg_polymer_15">Script tags should have either a URL or an inlined body.
<a href="#msg_polymer_15">#15</a></h2> |
| 351 <p>You have a script tag that includes both a <code>src</code> attribute, and sc
ript text |
| 352 inlined. You must choose one or the other.</p> |
| 353 <hr /> |
| 354 |
| 355 <h2 id="msg_polymer_16">Incorrect instantiation: missing base tag in instantiati
on. <a href="#msg_polymer_16">#16</a></h2> |
| 356 <p>When you declare that a custom element extends from a base tag, for example:<
/p> |
| 357 <pre><code><polymer-element name="my-example" extends="ul"> |
| 358 </code></pre> |
| 359 <p>or:</p> |
| 360 <pre><code><polymer-element name="my-example2" extends="ul"> |
| 361 <polymer-element name="my-example" extends="my-example2"> |
| 362 </code></pre> |
| 363 <p>You should instantiate <code>my-example</code> by using this syntax:</p> |
| 364 <pre><code><ul is="my-example"> |
| 365 </code></pre> |
| 366 <p>And not:</p> |
| 367 <pre><code><my-example> |
| 368 </code></pre> |
| 369 <p>Only elements that don't extend from existing HTML elements are created using |
| 370 the latter form.</p> |
| 371 <p>This is because browsers first create the base element, and then upgrade them
to |
| 372 have the extra functionality of your custom element. In the example above, using |
| 373 <code><ul></code> tells the browser what is the base type that they need t
o create before |
| 374 doing the upgrade.</p> |
| 375 <hr /> |
| 376 |
| 377 <h2 id="msg_polymer_17">Incorrect instantiation: extra <code>is</code> attribute
or missing <code>extends</code> in declaration. <a href="#msg_polymer_17">#17</
a></h2> |
| 378 <p>Creating a custom element using the syntax:</p> |
| 379 <pre><code><ul is="my-example"> |
| 380 </code></pre> |
| 381 <p>means that the declaration of <code>my-example</code> extends transitively fr
om <code>ul</code>. This |
| 382 error message is shown if the definition of <code>my-example</code> doesn't decl
are this |
| 383 extension. It might be that you no longer extend from the base element, in which |
| 384 case the fix is to change the instantiation to:</p> |
| 385 <pre><code><my-example> |
| 386 </code></pre> |
| 387 <p>or that the declaration needs to be fixed and include the <code>extends</code
> attribute, |
| 388 for example:</p> |
| 389 <pre><code><polymer-element name="my-example" extends="ul"> |
| 390 </code></pre> |
| 391 <hr /> |
| 392 |
| 393 <h2 id="msg_polymer_18">Incorrect instantiation: base tag seems wrong <a href="#
msg_polymer_18">#18</a></h2> |
| 394 <p>It seems you have a declaration like:</p> |
| 395 <pre><code><polymer-element name="my-example" extends="div"> |
| 396 </code></pre> |
| 397 <p>but an instantiation like:</p> |
| 398 <pre><code><span is="my-example"> |
| 399 </code></pre> |
| 400 <p>Both the declaration and the instantiation need to match on the base type. So |
| 401 either the instantiation needs to be fixed to be more like:</p> |
| 402 <pre><code><span is="my-example"> |
| 403 </code></pre> |
| 404 <p>or the declaration should be fixed to be like:</p> |
| 405 <pre><code><polymer-element name="my-example" extends="span"> |
| 406 </code></pre> |
| 407 <hr /> |
| 408 |
| 409 <h2 id="msg_polymer_19">No dashes allowed in custom attributes <a href="#msg_pol
ymer_19">#19</a></h2> |
| 410 <p>Polymer used to recognize attributes with dashes like <code>my-name</code> an
d convert them |
| 411 to match properties where dashes were removed, and words follow the camelCase |
| 412 style (for example <code>myName</code>). This feature is no longer available. No
w simply |
| 413 use the same name as the property.</p> |
| 414 <p>Because HTML attributes are case-insensitive, you can also write the name of |
| 415 your property entirely in lowercase. Just be sure that your custom-elements |
| 416 don't declare two properties with the same name but different capitalization.</p
> |
| 417 <hr /> |
| 418 |
| 419 <h2 id="msg_polymer_20">Event handlers not supported here <a href="#msg_polymer_
20">#20</a></h2> |
| 420 <p>Bindings of the form <code>{{ }}</code> are supported inside <code><templa
te></code> nodes, even outside |
| 421 of <code><polymer-element></code> declarations. However, those bindings on
ly support binding |
| 422 values into the content of a node or an attribute.</p> |
| 423 <p>Inline event handlers of the form <code>on-click="{{method}}"</code> are a sp
ecial feature |
| 424 of polymer elements, so they are only supported inside <code><polymer-element
></code> |
| 425 definitions.</p> |
| 426 <hr /> |
| 427 |
| 428 <h2 id="msg_polymer_21">Event handler bindings are method names, not expressions
. <a href="#msg_polymer_21">#21</a></h2> |
| 429 <p>Unlike data bindings, event handler bindings of the form <code>on-click="{{me
thod}}"</code> |
| 430 are not evaluated as expressions. They are meant to just contain a simple name |
| 431 that resolves to a method in your polymer element's class definition.</p> |
| 432 <hr /> |
| 433 |
| 434 <h2 id="msg_polymer_22">Nested polymer element definitions are not allowed. <a h
ref="#msg_polymer_22">#22</a></h2> |
| 435 <p>Because custom element names are global, there is no need to have a |
| 436 <code><polymer-element></code> defined nested within a <code><polymer-e
lement></code>. If you have a |
| 437 definition inside another, please move the sencond definition out.</p> |
| 438 <p>It's possible that you see this error if you have an HTML import within a |
| 439 polymer element. You should be able to also move the import out of the element |
| 440 definition.</p> |
| 441 <hr /> |
| 442 |
| 443 <h2 id="msg_polymer_23">Polymer element definitions must have a name. <a href="#
msg_polymer_23">#23</a></h2> |
| 444 <p>Polymer element definitions must have a name. You can include a name by using |
| 445 the <code>name</code> attribute in <code><polymer-element></code> for exam
ple:</p> |
| 446 <pre><code><polymer-element name="my-example"> |
| 447 </code></pre> |
| 448 <hr /> |
| 449 |
| 450 <h2 id="msg_polymer_24">Custom element names must have a dash. <a href="#msg_pol
ymer_24">#24</a></h2> |
| 451 <p>Custom element names must have a dash and can't be any of the 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> |
| 453 <hr /> |
| 454 |
| 455 <h2 id="msg_polymer_25">An error occurred while iniling an import <a href="#msg_
polymer_25">#25</a></h2> |
| 456 <p>An error occurred while iniling an import in the polymer build. This is often |
| 457 the result of a broken HTML import.</p> |
| 458 <hr /> |
| 459 |
| 460 <h2 id="msg_polymer_26">An error occurred while iniling a stylesheet. <a href="#
msg_polymer_26">#26</a></h2> |
| 461 <p>An error occurred while iniling a stylesheet in the polymer build. This is of
ten |
| 462 the result of a broken URL in a <code><link rel="stylesheet" href="..."></
code>.</p> |
| 463 <hr /> |
| 464 |
| 465 <h2 id="msg_polymer_27">URL to a script file might be incorrect <a href="#msg_po
lymer_27">#27</a></h2> |
| 466 <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><script src="..."></code>.</p> |
| 468 <hr /> |
| 469 |
| 470 <h2 id="msg_polymer_28">Not all browsers support bindings to URL attributes <a h
ref="#msg_polymer_28">#28</a></h2> |
| 471 <p>Not all browsers support bindings to URL attributes. Some browsers might |
| 472 sanitize the attributes and result in an incorrect link. For this reason polymer |
| 473 provides a special set of attributes that let you bypass any browser internal |
| 474 attribute validation. The name of the attribute is the same as the original |
| 475 attribute, but with a leading underscore. For example, instead of writing:</p> |
| 476 <pre><code><img src="{{binding}}"> |
| 477 </code></pre> |
| 478 <p>you can write:</p> |
| 479 <pre><code><img _src="{{binding}}"> |
| 480 </code></pre> |
| 481 <p>For more information, see <a href="http://goo.gl/5av8cU">http://goo.gl/5av8cU
</a>.</p> |
| 482 <hr /> |
| 483 |
| 484 <h2 id="msg_polymer_29">The special underscore attribute is only for bindings. <
a href="#msg_polymer_29">#29</a></h2> |
| 485 <p>A special attribute exists to support bindings on URL attributes. For example
, |
| 486 this correctly binds the <code>src</code> attribute in an image:</p> |
| 487 <pre><code><img _src="{{binding}}"> |
| 488 </code></pre> |
| 489 <p>However, this special <code>_src</code> attribute is only available for bindi
ngs. If you |
| 490 just have a URL, use the normal <code>src</code> attribute instead.</p> |
| 491 <hr /> |
| 492 |
| 493 <h2 id="msg_polymer_30">Internal error: don't know how to include a URL <a href=
"#msg_polymer_30">#30</a></h2> |
| 494 <p>Sorry, you just run into a bug in the polymer transformer code. Please file a |
| 495 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including if
possible some example code that can |
| 496 help us reproduce the issue so we can investigate.</p> |
| 497 <hr /> |
| 498 |
| 499 <h2 id="msg_polymer_31">Internal error: phases run out of order <a href="#msg_po
lymer_31">#31</a></h2> |
| 500 <p>Sorry, you just run into a bug in the polymer transformer code. Please file a |
| 501 bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including if
possible some example code that can |
| 502 help us reproduce the issue so we can investigate.</p> |
| 503 <hr /> |
| 504 |
| 505 <h2 id="msg_polymer_32"><code>@CustomTag</code> is only supported on public clas
ses. <a href="#msg_polymer_32">#32</a></h2> |
| 506 <p>The <code>@CustomTag</code> annotation is currently only supported on public
classes. If |
| 507 you need to register a custom element whose implementation is a private class, |
| 508 you can still do so by invoking <code>Polymer.register</code> within a public me
thod marked |
| 509 with <code>@initMethod</code>.</p> |
| 510 <hr /> |
| 511 |
| 512 <h2 id="msg_polymer_33"><code>@initMethod</code> is only supported on public fun
ctions. <a href="#msg_polymer_33">#33</a></h2> |
| 513 <p>The <code>@initMethod</code> annotation is currently only supported on public
top-level |
| 514 functions.</p> |
| 515 <hr /> |
| 516 |
| 517 <h2 id="msg_polymer_34">Missing argument in annotation <a href="#msg_polymer_34"
>#34</a></h2> |
| 518 <p>The annotation expects one argument, but the argument was not provided.</p> |
| 519 <hr /> |
| 520 |
| 521 <h2 id="msg_polymer_35">Invalid argument in annotation <a href="#msg_polymer_35"
>#35</a></h2> |
| 522 <p>We expected a constant argument in an annotation, but the polymer build was n
ot |
| 523 able to extract the value of this argument. This can happen if your code is |
| 524 currently in a state that can't be analyzed (for example, it has parse |
| 525 errors) or if the expression passed as an argument is invalid (for example, it |
| 526 is not a compile-time constant).</p> |
| 527 <hr /> |
| 528 |
| 529 <h2 id="msg_polymer_36">No polymer initializers found <a href="#msg_polymer_36">
#36</a></h2> |
| 530 <p>No polymer initializers were found. Make sure to either |
| 531 annotate your polymer elements with @CustomTag or include a |
| 532 top level method annotated with @initMethod that registers your |
| 533 elements. Both annotations are defined in the polymer library ( |
| 534 package:polymer/polymer.dart).</p> |
| 535 <hr /> |
| 536 |
| 537 <h2 id="msg_polymer_37">Event bindings with @ are no longer supported <a href="#
msg_polymer_37">#37</a></h2> |
| 538 <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> |
| 540 <pre><code><div on-click="{{@a.b.c}}"> |
| 541 |
| 542 </code></pre> |
| 543 <p>This feature is no longer supported.</p> |
| 544 <hr /> |
| 545 |
| 546 <h2 id="msg_polymer_38">Private symbols cannot be used in event handlers <a href
="#msg_polymer_38">#38</a></h2> |
| 547 <p>Currently private members can't be used on event handlers. So you can't write
:</p> |
| 548 <pre><code><div on-click="{{_method}}"> |
| 549 </code></pre> |
| 550 <p>This restriction might be removed in the future, but for now, you need to mak
e |
| 551 your event handlers public.</p> |
| 552 <hr /> |
| 553 |
| 554 <h2 id="msg_polymer_39">Private symbols are not supported <a href="#msg_polymer_
39">#39</a></h2> |
| 555 <p>Private members can't be used on binding expressions. For example, you can't |
| 556 write:</p> |
| 557 <pre><code><div>{{a.b._c}}</div> |
| 558 </code></pre> |
| 559 <hr /> |
| 560 |
| 561 <h2 id="msg_polymer_40">A warning was found while parsing the html document <a h
ref="#msg_polymer_40">#40</a></h2> |
| 562 <p>We use a parser that implements the HTML5 spec (<code>html5lib</code>). We re
port any |
| 563 warnings that were detected by our parser during the polymer build process.</p> |
| 564 <hr /></body> |
| 565 </html> |
OLD | NEW |