Index: pkg/web_components/lib/platform.concat.js |
diff --git a/pkg/web_components/lib/platform.concat.js b/pkg/web_components/lib/platform.concat.js |
index 2044ee351a452fa27b35c88e93128acf2c446804..9481eee0be7c3190376eb21a565fd7d11cdd3646 100644 |
--- a/pkg/web_components/lib/platform.concat.js |
+++ b/pkg/web_components/lib/platform.concat.js |
@@ -5440,6 +5440,43 @@ window.ShadowDOMPolyfill = {}; |
scope.wrappers.HTMLContentElement = HTMLContentElement; |
})(window.ShadowDOMPolyfill); |
+/* |
+ * Copyright 2014 The Polymer Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style |
+ * license that can be found in the LICENSE file. |
+ */ |
+ |
+(function(scope) { |
+ 'use strict'; |
+ |
+ var HTMLElement = scope.wrappers.HTMLElement; |
+ var mixin = scope.mixin; |
+ var registerWrapper = scope.registerWrapper; |
+ var wrapHTMLCollection = scope.wrapHTMLCollection; |
+ var unwrap = scope.unwrap; |
+ var wrap = scope.wrap; |
+ |
+ var OriginalHTMLFormElement = window.HTMLFormElement; |
+ |
+ function HTMLFormElement(node) { |
+ HTMLElement.call(this, node); |
+ } |
+ HTMLFormElement.prototype = Object.create(HTMLElement.prototype); |
+ mixin(HTMLFormElement.prototype, { |
+ get elements() { |
+ // Note: technically this should be an HTMLFormControlsCollection, but |
+ // that inherits from HTMLCollection, so should be good enough. Spec: |
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection |
+ return wrapHTMLCollection(unwrap(this).elements); |
+ } |
+ }); |
+ |
+ registerWrapper(OriginalHTMLFormElement, HTMLFormElement, |
+ document.createElement('form')); |
+ |
+ scope.wrappers.HTMLFormElement = HTMLFormElement; |
+})(window.ShadowDOMPolyfill); |
+ |
// Copyright 2013 The Polymer Authors. All rights reserved. |
// Use of this source code is goverened by a BSD-style |
// license that can be found in the LICENSE file. |