Skip to content
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

Add more examples and use Permission API #44

Merged
merged 1 commit into from
Oct 16, 2017

Conversation

alexshalamov
Copy link

@alexshalamov alexshalamov commented Oct 13, 2017

Fixes: #43


Preview | Diff

Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

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

Very nice! Added some comments.

index.bs Outdated

als.onreading = () => {
let str = luxToWorkplaceLevel(als.illuminance);
if (typeof str !== 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps:

if (str) {
    console.log(\`Light level is suitable for: ${str}.\`);
}

Copy link
Author

Choose a reason for hiding this comment

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

done

return 'mechanical workshops, drawing, supermarkets';
} else if (lux > 1000 && lux < 5000) {
return 'detailed drawing work, visual tasks of low contrast';
}
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps good to explicitly return here (with and without will return undefined):

return;

Copy link
Author

Choose a reason for hiding this comment

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

done

@alexshalamov alexshalamov force-pushed the add_examples branch 2 times, most recently from f5f515c to b7adc08 Compare October 16, 2017 12:14
@anssiko anssiko merged commit 7a2c0a5 into w3c:gh-pages Oct 16, 2017
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.

None yet

3 participants