<base>
tags in the head.<0.12.0
.link[rel="x-dart-test"]
tags from the test
package to the transformer.Future
returned from the default main
method in package:polymer/init.dart
now guarantees that it will not complete until all @initMethod
and @whenPolymerReady
functions have been executed. This is to support writing tests inside these methods using the new test
package.polymer_interop
for everything polymer js related. Projects which only provide/use wrappers around js elements should be able to switch to using that package instead of this one.html5lib
to html
.html5lib
package dependency to html
.Added @whenPolymerReady
annotation for functions. This will call the function once Polymer.onReady
completes, reducing the boilerplate in entry points to the following:
import 'package:polymer/polymer.dart'; export 'package:polymer/init.dart'; @whenPolymerReady void onReady() { /// Custom setup code here. }
initWebComponents
internally which gives better guarantees around development time ordering of initializers. This should fix most issues related to element registration order.args
constraint.bindingStartDelimiters
to the ImportInlinerTransformer
so it can handle bindings in urls appropriately, #35.web_components
constraint.smoke
package to <0.4.0
.initPolymer
now returns a Future<Zone>
instead of a Zone
. This will likely affect most polymer applications.
Given a current program:
main() => initPolymer().run(realMain); realMain() => ...
This should be translated to:
main() => initPolymer().then((zone) => zone.run(realMain)); realMain() => ...
Or alternatively, you can use an @initMethod:
main() => initPolymer(); @initMethod realMain() => ...
Dropped support for the experimental bootstrap.
The polymer
transformer is now integrated with the initialize
transformer. This means you can now use @HtmlImport
on library directives. This allows producers of elements to declare their own html dependencies so consumers don't have to know about your html imports at all. See web_components 0.10.2 for more information on @HtmlImport.
The startPolymer
method no longer takes a deployMode
argument. This is meant as an internal-only method and should not affect apps. It also now returns a Future
.
The transformer has been heavily refactored and may behave slightly differently. Please file any bugs related to this at https://github.com/dart-lang/polymer-dart/issues/new.
injectBoundHTML
to injectBoundHtml
and changed its signature to use named instead of positional optional arguments. Also added support for custom NodeValidator
and/or TreeSanitizer
. The old version still exists for now with an @deprecated
annotation.auto-binding-dart
template element. This removes some false positive warnings.polymer.js
is now the unminified version, and polymer.min.js
is the minified version.dart_support.js
is always appended after platform.js
, 21435.Warn if the same css file is inlined more than once, 19996.
Don't start moving elements from head to body until we find the first import, 20826.
Add option to not inject platform.js in the build output 20865. To use, set inject_platform_js
to false in the polymer transformer config section of your pubspec.yaml:
transformers: - polymer: inject_platform_js: false ...
export 'package:polymer/default_build.dart';
20396.auto-binding-dart
template, 20913.code_transformers
newer than 0.2.3
.args
to 0.11.0
.polymer:new_element
pub run polymer:new_element
now supports specifying a base class. Note: only native DOM types and custom elements written in Dart can be extended. Elements adapted from Javascript (like core- and paper- elements) cannot be extended.polymer:new_entry
.New: When running in pub-serve, any warnings and errors detected by the polymer transformers will be displayed in the lower-right corner of your entrypoint page. You can opt-out by adding this option to your pubspec:
transformers: - polymer: ... inject_build_logs_in_output: false
New: there are now two template generators in the polymer package! On any project that depends on polymer, you can create template files for a new custom element by invoking:
pub run polymer:new_element element-name [-o output_dir]
And, if you invoke:
pub run polymer:new_entry web/index.html
we will create a new entry-point file and add it to your pubspec for you.
Added the ability to override the stylesheet inlining behavior. There is now an option exposed in the pubspec.yaml called inline_stylesheets
. There are two possible values, a boolean or a map. If only a boolean is supplied then that will set the global default behavior. If a map is supplied, then the keys should be file paths, and the value is a boolean. You can use the special key ‘default’ to set the default value.
For example, the following would change the default to not inline any styles, except for the foo.css file in your web folder and the bar.css file under the foo packages lib directory:
transformers: - polymer: ... inline_stylesheets: default: false web/foo.css: true packages/foo/bar.css: true
Bug fix for http://dartbug.com/20286. Bindings in url attributes will no longer throw an error.
unittest
._src
and similar attributes in polymer transformers.getLocationMessage
.source_maps
' Span
class to source_span
's SourceSpan
class.<head>
.<polymer-element>
.@
are no longer supported.@published
by default is no longer reflected as an attribute by default. This might break if you try to use the attribute in places like CSS selectors. To make it reflected back to an attribute use @PublishedProperty(reflect: true)
.<link rel="import" href="packages/polymer/polymer.html">
@ObserveProperty('foo bar.baz') myMethod() {...}
will cause myMethod to be called when “foo” or “bar.baz” changes.