This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ MozElements.MozElementMixin = Base => class MozElement extends Base {
9090 * based on the static `inheritedAttributes` Object. This can be overridden by callers.
9191 */
9292 attributeChangedCallback ( name , oldValue , newValue ) {
93- if ( ! this . isConnectedAndReady || oldValue === newValue || ! this . inheritedAttributesCache ) {
93+ if ( oldValue === newValue || ! this . inheritedAttributesCache ) {
9494 return ;
9595 }
9696
Original file line number Diff line number Diff line change 1919 <inherited-element-declarative foo =" fuagra" ></inherited-element-declarative >
2020 <inherited-element-shadowdom-declarative foo =" fuagra" ></inherited-element-shadowdom-declarative >
2121 <inherited-element-imperative foo =" fuagra" ></inherited-element-imperative >
22+ <inherited-element-beforedomloaded foo =" fuagra" ></inherited-element-beforedomloaded >
2223
24+ <!-- test code running before page load goes here -->
25+ <script type =" application/javascript" ><![CDATA[
26+ class InheritAttrsChangeBeforDOMLoaded extends MozXULElement {
27+ static get inheritedAttributes() {
28+ return {
29+ "label": "foo",
30+ };
31+ }
32+ connectedCallback() {
33+ this.append(MozXULElement.parseXULToFragment(`<label />`));
34+ this.label = this.querySelector("label");
35+
36+ this.initializeAttributeInheritance();
37+ is(this.label.getAttribute("foo"), "fuagra",
38+ "InheritAttrsChangeBeforDOMLoaded: attribute should be propagated #1");
39+
40+ this.setAttribute("foo", "chuk&gek");
41+ is(this.label.getAttribute("foo"), "chuk&gek",
42+ "InheritAttrsChangeBeforDOMLoaded: attribute should be propagated #2");
43+ }
44+ }
45+ customElements.define("inherited-element-beforedomloaded",
46+ InheritAttrsChangeBeforDOMLoaded);
47+ ]]>
48+ </script >
2349
2450 <!-- test code goes here -->
2551 <script type =" application/javascript" ><![CDATA[
Original file line number Diff line number Diff line change @@ -61,8 +61,7 @@ class MozWizardButtons extends MozXULElement {
6161
6262 static get inheritedAttributes ( ) {
6363 return AppConstants . platform == "macosx" ? {
64- "[dlgtype='finish']" : "hidefinishbutton" ,
65- "[dlgtype='next']" : "lastpage" ,
64+ "[dlgtype='next']" : "hidden=lastpage" ,
6665 } : null ;
6766 }
6867
@@ -144,8 +143,7 @@ class MozWizardButtons extends MozXULElement {
144143
145144 onPageChange ( ) {
146145 if ( AppConstants . platform == "macosx" ) {
147- this . setAttribute ( "hidefinishbutton" ,
148- ! ( this . getAttribute ( "lastpage" ) == "true" ) ) ;
146+ this . getButton ( "finish" ) . hidden = ! ( this . getAttribute ( "lastpage" ) == "true" ) ;
149147 } else if ( this . getAttribute ( "lastpage" ) == "true" ) {
150148 this . _wizardButtonDeck . setAttribute ( "selectedIndex" , 0 ) ;
151149 } else {
You can’t perform that action at this time.
0 commit comments