| Index: pkg/polymer/lib/src/instance.dart
|
| diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
|
| index 37a43ea8ed60effa1947b61e336cb1831505874f..9965a1e96cf9379e59531e346316829f97a8f15d 100644
|
| --- a/pkg/polymer/lib/src/instance.dart
|
| +++ b/pkg/polymer/lib/src/instance.dart
|
| @@ -221,6 +221,17 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
|
| /// for use.
|
| static Future get onReady => _onReady.future;
|
|
|
| + /// Returns a list of elements that have had polymer-elements created but
|
| + /// are not yet ready to register. The list is an array of element
|
| + /// definitions.
|
| + static List<Element> get waitingFor =>
|
| + _Polymer.callMethod('waitingFor', [null]);
|
| +
|
| + /// Forces polymer to register any pending elements. Can be used to abort
|
| + /// waiting for elements that are partially defined.
|
| + static forceReady([int timeout]) =>
|
| + _Polymer.callMethod('forceReady', [null, timeout]);
|
| +
|
| /// The most derived `<polymer-element>` declaration for this element.
|
| PolymerDeclaration get element => _element;
|
| PolymerDeclaration _element;
|
| @@ -1268,6 +1279,18 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
|
| // Dart note: made start smarter, so we don't need to call stop.
|
| return job..start(callback, wait);
|
| }
|
| +
|
| + /// Inject HTML which contains markup bound to this element into
|
| + /// a target element (replacing target element content).
|
| + DocumentFragment injectBoundHTML(String html, [Element element]) {
|
| + var template = new TemplateElement()..innerHtml = html;
|
| + var fragment = this.instanceTemplate(template);
|
| + if (element != null) {
|
| + element.text = '';
|
| + element.append(fragment);
|
| + }
|
| + return fragment;
|
| + }
|
| }
|
|
|
| // Dart note: this is related to _bindOldStylePublishedProperty. Polymer
|
|
|