Skip to content

Conversation

@mduan
Copy link

@mduan mduan commented Jun 17, 2022

@mduan mduan force-pushed the md-router-dont-update-url branch 2 times, most recently from f989d8c to 04cb569 Compare June 17, 2022 01:17
@mduan mduan force-pushed the md-router-dont-update-url branch from 04cb569 to 76a5eaa Compare June 17, 2022 02:33
Comment on lines +324 to +332
el.setAttribute(`style-override`, `:host { background-color: red; }`);
await nextAnimationFrame();
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background: red; }`);
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background-color: red; }`);
});

it(`it applies the styles even if the component isn't attached to the DOM`, function () {
el = document.createElement(`shadow-dom-app`);
el.setAttribute(`style-override`, `:host { background: red; }`);
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background: red; }`);
el.setAttribute(`style-override`, `:host { background-color: red; }`);
expect(getComponentStylesheetText(el)).to.equal(`:host { color: blue; }:host { background-color: red; }`);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix test failure in Firefox: expected ':host { color: blue; }:host { background: red none repeat scroll 0% 0%; }' to equal ':host { color: blue; }:host { background: red; }'

Unrelated to my changes (happens on master).

}

navigate(fragment, stateUpdate = {}) {
navigate(fragment, stateUpdate = {}, {dontUpdateUrl = false} = {}) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered naming the flag updateUrl, but slightly prefer false by default param, so went with dontUpdateUrl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants