Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 'use strict'; | |
| 6 | |
| 7 installClass("HTMLVideoElement", function(global, HTMLVideoElementPrototype) { | |
| 8 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
| |
| 9 Object.defineProperty(prototype, propertyName, { | |
| 10 get: function() { | |
| 11 return this.getAttribute(attributeName) || ''; | |
| 12 }, | |
| 13 set: function(value) { | |
| 14 this.setAttribute(attributeName, value); | |
| 15 }, | |
| 16 configurable: true, | |
| 17 enumerable: true, | |
| 18 }); | |
| 19 } | |
| 20 | |
| 21 reflectAttribute(HTMLVideoElementPrototype, 'width', 'width'); | |
| 22 reflectAttribute(HTMLVideoElementPrototype, 'height', 'height'); | |
| 23 //reflectAttribute(HTMLVideoElementPrototype, 'poster', 'poster'); | |
| 24 }); | |
| OLD | NEW |