File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,12 @@ export const PropertiesMixin = dedupingMixin(superClass => {
8686 if ( ! constructor . hasOwnProperty ( JSCompiler_renameProperty ( '__ownProperties' , constructor ) ) ) {
8787 let props = null ;
8888
89- if ( constructor . hasOwnProperty ( JSCompiler_renameProperty ( 'properties' , constructor ) ) && constructor . properties ) {
90- props = normalizeProperties ( constructor . properties ) ;
89+ if ( constructor . hasOwnProperty ( JSCompiler_renameProperty ( 'properties' , constructor ) ) ) {
90+ const properties = constructor . properties ;
91+
92+ if ( properties ) {
93+ props = normalizeProperties ( properties ) ;
94+ }
9195 }
9296
9397 constructor . __ownProperties = props ;
Original file line number Diff line number Diff line change 4444class MyElement extends PropertiesMixin ( HTMLElement ) {
4545
4646 static get properties ( ) {
47+ this . _calledProperties ++ ;
48+
4749 return {
4850 prop : String ,
4951 noStomp : String ,
111113MyElement . prototype . _calledReady = 0 ;
112114MyElement . prototype . _callAttributeChangedCallback = 0 ;
113115
116+ MyElement . constructor . prototype . _calledProperties = 0 ;
117+
114118customElements . define ( 'my-element' , MyElement ) ;
115119
116120window . MyElement = MyElement ;
236240 assert . equal ( el . _calledConnectedCallback , 1 ) ;
237241 assert . equal ( el . _calledReady , 1 ) ;
238242 assert . equal ( el . _callAttributeChangedCallback , 0 ) ;
243+ assert . equal ( el . constructor . _calledProperties , 1 ) ;
239244 } ) ;
240245
241246 test ( 'listeners' , function ( ) {
You can’t perform that action at this time.
0 commit comments