OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 Polymer({ | |
6 is: 'saml-interstitial', | |
xiyuan
2016/03/28 20:58:40
nit: insert an empty line between all fields
afakhry
2016/03/28 23:15:32
Done.
| |
7 properties: { | |
8 domain: { | |
9 type: String, | |
10 observer: 'onDomainChanged_' | |
11 }, | |
12 showDomainMessages_: { | |
13 type: Boolean, | |
14 value: false | |
15 }, | |
16 }, | |
17 i18n_: function(args) { | |
18 return loadTimeData.getStringF.apply(loadTimeData, args); | |
19 }, | |
20 onDomainChanged_: function() { | |
21 this.$.message.content = | |
22 this.i18n_(['samlInterstitialMessage', this.domain]); | |
xiyuan
2016/03/28 20:58:40
Why not just use loadTimeData here?
i.e.
this.$
afakhry
2016/03/28 23:15:32
Thanks this is certainly better. I saw an example
xiyuan
2016/03/29 02:10:49
I suspect the sample does it that way because of i
| |
23 this.showDomainMessages_ = !!this.domain.length; | |
xiyuan
2016/03/28 20:58:40
|showDomainMessages_| seems redundant. If we do wa
afakhry
2016/03/28 23:15:32
I added a comment to the html.
| |
24 }, | |
25 onSamlPageNextClicked_: function() { | |
26 this.dispatchEvent(new Event('samlPageNextClicked')); | |
xiyuan
2016/03/28 20:58:40
nit: this.fire('samlPageNextClicked');
afakhry
2016/03/28 23:15:32
Done.
| |
27 }, | |
28 onSamlPageChangeAccountClicked_: function() { | |
29 this.dispatchEvent(new Event('samlPageChangeAccountClicked')); | |
xiyuan
2016/03/28 20:58:40
nit: this.fire('samlPageChangeAccountClicked');
afakhry
2016/03/28 23:15:32
Done.
| |
30 }, | |
31 }); | |
OLD | NEW |