mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
more marks (on the bench)
This commit is contained in:
@@ -25,9 +25,10 @@
|
||||
},
|
||||
|
||||
registerFeatures: function(prototype) {
|
||||
Base._features.forEach(function(f) {
|
||||
var f$ = this._features;
|
||||
for (var i=0, n=f$.length; i<n && (f=f$[i]); i++) {
|
||||
f.register && f.register(prototype);
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
createdCallback: function() {
|
||||
@@ -43,9 +44,10 @@
|
||||
},
|
||||
|
||||
initFeatures: function() {
|
||||
Base._features.forEach(function(f) {
|
||||
var f$ = this._features;
|
||||
for (var i=0, n=f$.length; i<n && (f=f$[i]); i++) {
|
||||
f.init && f.init.call(this);
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
created: function() {
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@
|
||||
document.querySelector('frame-tester').tests = [
|
||||
'div.html',
|
||||
|
||||
'x-div-nada.html',
|
||||
'x-div-raw.html',
|
||||
|
||||
'x-div-base-0-trivial.html',
|
||||
'x-div-base-1-callbacks.html',
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
'x-div-polymer-0-trivial.html',
|
||||
|
||||
'x-div-trivial.html',
|
||||
'x-div-default.html'
|
||||
'x-div-neo-0-nofeatures.html',
|
||||
'x-div-neo-1-default.html'
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
_features: [],
|
||||
|
||||
addFeature: function(feature) {
|
||||
/*
|
||||
this._features.push(feature);
|
||||
extend(Base, feature);
|
||||
delete Base.init;
|
||||
delete Base.register;
|
||||
*/
|
||||
},
|
||||
|
||||
registerCallback: function() {
|
||||
|
||||
@@ -4,26 +4,31 @@
|
||||
|
||||
<link rel="import" href="../../neoprene/polymer.html">
|
||||
|
||||
<body>
|
||||
|
||||
<script>console.perf();</script>
|
||||
|
||||
<style>
|
||||
|
||||
x-div {
|
||||
display: block;
|
||||
border: 1px solid red;
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
name: 'x-div',
|
||||
// not necessary, for just for clarity
|
||||
features: Polymer.defaultFeatures
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<body>
|
||||
|
||||
<script>console.perf();</script>
|
||||
|
||||
<script>
|
||||
|
||||
var frag = document.createDocumentFragment();
|
||||
for (var i=0; i<1000; i++) {
|
||||
@@ -18,8 +18,7 @@
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
name: 'x-div',
|
||||
features: Polymer.noFeatures
|
||||
name: 'x-div'
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user