| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/base/event.html"> | 8 <link rel="import" href="/tracing/base/event.html"> |
| 9 <link rel="import" href="/tracing/ui/base/ui.html"> | 9 <link rel="import" href="/tracing/ui/base/ui.html"> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 this.observer_ = new WebKitMutationObserver(this.didMutate_.bind(this)); | 27 this.observer_ = new WebKitMutationObserver(this.didMutate_.bind(this)); |
| 28 this.observer_.observe(this, { childList: true }); | 28 this.observer_.observe(this, { childList: true }); |
| 29 | 29 |
| 30 // textContent is a variable on regular HTMLElements. However, we want to | 30 // textContent is a variable on regular HTMLElements. However, we want to |
| 31 // hook and prevent writes to it. | 31 // hook and prevent writes to it. |
| 32 Object.defineProperty( | 32 Object.defineProperty( |
| 33 this, 'textContent', | 33 this, 'textContent', |
| 34 { get: undefined, set: this.onSetTextContent_}); | 34 { get: undefined, set: this.onSetTextContent_}); |
| 35 }, | 35 }, |
| 36 | 36 |
| 37 // TODO(polymer): Do we need to use Polymer.dom on these functions? |
| 37 appendChild: function(x) { | 38 appendChild: function(x) { |
| 38 HTMLUnknownElement.prototype.appendChild.call(this, x); | 39 HTMLUnknownElement.prototype.appendChild.call(this, x); |
| 39 this.didMutate_(this.observer_.takeRecords()); | 40 this.didMutate_(this.observer_.takeRecords()); |
| 40 }, | 41 }, |
| 41 | 42 |
| 42 insertBefore: function(x, y) { | 43 insertBefore: function(x, y) { |
| 43 HTMLUnknownElement.prototype.insertBefore.call(this, x, y); | 44 HTMLUnknownElement.prototype.insertBefore.call(this, x, y); |
| 44 this.didMutate_(this.observer_.takeRecords()); | 45 this.didMutate_(this.observer_.takeRecords()); |
| 45 }, | 46 }, |
| 46 | 47 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 doneDecoratingForNow_: function() { | 99 doneDecoratingForNow_: function() { |
| 99 } | 100 } |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 return { | 103 return { |
| 103 ContainerThatDecoratesItsChildren: ContainerThatDecoratesItsChildren | 104 ContainerThatDecoratesItsChildren: ContainerThatDecoratesItsChildren |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 }); | 107 }); |
| 107 </script> | 108 </script> |
| OLD | NEW |