Skip to content

Commit

Permalink
Merge pull request #4404 from Polymer/legacy-behavior-proto-keys
Browse files Browse the repository at this point in the history
add properties, behaviors, observers, hostAttributes, listeners on prototype
  • Loading branch information
Steve Orvell authored Mar 14, 2017
2 parents a158a1f + 93cf324 commit a88766b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/legacy/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@
registered: true,
attributeChanged: true,
// meta objects
behaviors: true,
hostAttributes: true,
properties: true,
observers: true,
listeners: true
behaviors: true
}

/**
Expand Down
15 changes: 14 additions & 1 deletion test/unit/behaviors.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@

behaviors: [
Polymer.BehaviorA
]
],

properties: {},
observers: [],
hostAttributes: {},
listeners: {}
});

Polymer({
Expand Down Expand Up @@ -307,6 +312,14 @@
assert.equal(el.is, 'single-behavior');
});

test('instance behaviors, properties, observers, hostAttributes, listeners', function() {
assert.isOk(el.behaviors);
assert.isOk(el.properties);
assert.isOk(el.observers);
assert.isOk(el.hostAttributes);
assert.isOk(el.listeners);
});

test('ready from behavior', function() {
assert.equal(el.__readyA, true);
});
Expand Down

0 comments on commit a88766b

Please sign in to comment.