Giter Site home page Giter Site logo

explainers-by-googlers / locked-mode Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 153 KB

Provides a way for a site to prompt the user to enter a locked-down fullscreen mode, and the user cannot 1) use other apps and OS features or 2) exit this mode without notifying the site. Enables users to take low-stakes tests or focus on specific contents in a classroom setting.

License: Creative Commons Attribution 4.0 International

Bikeshed 100.00%

locked-mode's People

Contributors

icysteam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

aljbore1

locked-mode's Issues

Do request() and exit() resolve with a value?

From the API description and example, it's not clear if the intention is for nagivator.lockedMode.request() and nagivator.lockedMode.exit() to resolve with some value other than undefined. The example code saves enterResult and exitResult but I suspect there's no useful value to return.

Permissions Policy integration

Fullscreen API specifies a Permissions Policy-controlled feature called fullscreen with default allow-list of self.[1] This proposal appears to lack an explicit separate feature for locked and unlocked fullscreen mode. Given the potential for abuse of a system-level full-screen lock, is there any interest in introducing a separate sub-feature specifically for the lock, e.g. called fullscreen-lock?

[1] Fullscreen API specification paragraph 6 "Permissions Policy Integration"

Feature detection of requestFullscreen() extensions would be possible

The explainer says:

Does not allow developers to detect the Locked Mode feature by checking the existence of a separate API

Although complex, feature detection is possible if we're considering new dictionary members. Example using navigationUI:

let supported = false;
document.createElement('div').requestFullscreen({
  get navigationUI() { supported = true; }
}).catch(() => {});
console.log(supported);

This will make its way through bindings and access navigationUI of the options object passed in, but the request will be rejected and do nothing because the element isn't attached.

Behavior in iframes?

Should the API only work for top-level browsing contexts, or what does nagivator.lockedMode.request() do inside an iframe?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.