Chromium Code Reviews| Index: Source/core/html/HTMLVideoElement.js |
| diff --git a/Source/core/html/HTMLVideoElement.js b/Source/core/html/HTMLVideoElement.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9dc7da256c7ee59f31ca8896d7a2fae556f8b9f4 |
| --- /dev/null |
| +++ b/Source/core/html/HTMLVideoElement.js |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +'use strict'; |
| + |
| +installClass("HTMLVideoElement", function(global, HTMLVideoElementPrototype) { |
| + function reflectAttribute(prototype, attributeName, propertyName) { |
|
haraken
2014/08/11 11:09:33
We want to share this function with HTMLMarqueeEle
hajimehoshi
2014/08/12 06:54:09
I've removed HTMLVideoElement.js. PrivateScriptUti
|
| + Object.defineProperty(prototype, propertyName, { |
| + get: function() { |
| + return this.getAttribute(attributeName) || ''; |
| + }, |
| + set: function(value) { |
| + this.setAttribute(attributeName, value); |
| + }, |
| + configurable: true, |
| + enumerable: true, |
| + }); |
| + } |
| + |
| + reflectAttribute(HTMLVideoElementPrototype, 'width', 'width'); |
| + reflectAttribute(HTMLVideoElementPrototype, 'height', 'height'); |
| + //reflectAttribute(HTMLVideoElementPrototype, 'poster', 'poster'); |
| +}); |