Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes the disable-upgrade feature from Polymer 2.0. #4571

Merged
merged 1 commit into from
Apr 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@

let caseMap = Polymer.CaseMap;

const DISABLED = 'disable-upgrade';

/**
* Returns the `properties` object specifically on `klass`. Use for:
* (1) super chain mixes togther to make `propertiesForClass` which is
Expand Down Expand Up @@ -453,8 +451,6 @@
proto._bindTemplate(template);
}

function flushPropertiesStub() {}

/**
* @polymerMixinClass
* @unrestricted
Expand All @@ -472,7 +468,7 @@
*/
static get observedAttributes() {
if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) {
let list = [DISABLED];
let list = [];
let properties = propertiesForClass(this);
for (let prop in properties) {
list.push(Polymer.CaseMap.camelToDashCase(prop));
Expand Down Expand Up @@ -720,19 +716,7 @@
* @override
*/
attributeChangedCallback(name, old, value) {
// process `disable-upgrade` specially:
// First we see `disable-upgrade` added and disable `_flushProperties`,
// then when it's removed, restore regular flushing and flush.
// This should only be allowed before "readying".
if (name === DISABLED && !this.__dataInitialized) {
if (value !== null) {
this.__flushProperties = this._flushProperties;
this._flushProperties = flushPropertiesStub;
} else {
this._flushProperties = this.__flushProperties;
this._flushProperties();
}
} else if (old !== value) {
if (old !== value) {
let property = caseMap.dashToCamelCase(name);
let type = propertiesForClass(this.constructor)[property].type;
if (!this._hasReadOnlyEffect(property)) {
Expand Down
5 changes: 0 additions & 5 deletions lib/mixins/template-stamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@
*/
class TemplateStamp extends superClass {

_initializeProperties() {
super._initializeProperties();
this.$ = null;
}

/**
* Scans a template to produce template metadata.
*
Expand Down
3 changes: 1 addition & 2 deletions test/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
'unit/logging.html',
'unit/mixin-utils.html',
'unit/mixin-behaviors.html',
'unit/render-status.html',
'unit/disable-upgrade.html'
'unit/render-status.html'
];

// http://eddmann.com/posts/cartesian-product-in-javascript/
Expand Down
98 changes: 0 additions & 98 deletions test/smoke/disable-upgrade.html

This file was deleted.

158 changes: 0 additions & 158 deletions test/unit/disable-upgrade.html

This file was deleted.