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

Unified Diff: pkg/polymer/lib/src/instance.dart

Issue 588373003: Update to polymer js version 0.4.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review updates 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/src/declaration.dart ('k') | pkg/polymer/lib/src/js/polymer/build.log » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « pkg/polymer/lib/src/declaration.dart ('k') | pkg/polymer/lib/src/js/polymer/build.log » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698