Skip to content

Move the entry point of the API to the window.navigator interface. #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

darktears
Copy link
Contributor

@darktears darktears commented Apr 29, 2021

Closes #67


Preview | Diff

@darktears
Copy link
Contributor Author

Copy link
Contributor

@beaufortfrancois beaufortfrancois left a comment

Choose a reason for hiding this comment

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

LGTM with nits

index.html Outdated
@@ -640,8 +640,8 @@ <h2>
<h3>Example 1: Posture data</h3>
<p>This is a simple use case of the <a>posture</a> being printed on the console. </p>
<pre class="example js" title="React to poster change">
screen.posture.addEventListener("change", () => {
console.log(`The current posture is: ${screen.posture.type}!`);
window.navigator.devicePosture.addEventListener("change", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
window.navigator.devicePosture.addEventListener("change", () => {
navigator.devicePosture.addEventListener("change", () => {

index.html Outdated
screen.posture.addEventListener("change", () => {
console.log(`The current posture is: ${screen.posture.type}!`);
window.navigator.devicePosture.addEventListener("change", () => {
console.log(`The current posture is: ${window.navigator.devicePosture.type}!`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log(`The current posture is: ${window.navigator.devicePosture.type}!`);
console.log(`The current posture is "${navigator.devicePosture.type}".`);

@darktears darktears force-pushed the screen-to-window-interface branch from 7c0a470 to a3272e6 Compare April 30, 2021 16:40
@kenchris kenchris merged commit bb94749 into w3c:gh-pages Apr 30, 2021
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.

Move the posture object out of the Screen interface.
3 participants