Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles
Last updated on : 2023-03-20
Barrier is an Android library that allows you to prevent the device from dimming, locking or turning off the screen, while your application is running in the background.
index.html
Source:index.html
1---2title: 'Feature-Policy: wake-lock'3slug: Web/HTTP/Headers/Feature-Policy/wake-lock4tags:5 - Directive6 - Feature-Policy7 - HTTP8 - Reference9 - Wake Lock API10---11<p>{{HTTPSidebar}} {{SeeCompatTable}}</p>1213<div class="hidden">14<p><strong>Note:</strong> This API is still actively being developed and available only behind a flag on select browsers and platforms.</p>15</div>1617<p>The HTTP {{HTTPHeader('Feature-Policy')}} header <code>wake-lock</code>Â directive controls whether the current document is allowed to use Wake Lock API to indicate that device should not enter power-saving mode.</p>1819<div class="notecard note">20<p><strong>Note:</strong> Latest drafts of <a href="/en-US/docs/Web/API/Screen_Wake_Lock_API">Screen Wake Lock API</a> defines {{HTTPHeader("Feature-Policy/screen-wake-lock","screen-wake-lock")}} directive.</p>21</div>2223<h2 id="Syntax">Syntax</h2>2425<pre class="notranslate">Feature-Policy: wake-lock <allowlist>;</pre>2627<dl>28 <dt><allowlist></dt>29 <dd>{{page('Web/HTTP/Feature_Policy/Using_Feature_Policy', 'allowlist')}}</dd>30</dl>3132<h2 id="Default_policy">Default policy</h2>3334<p>Default allow list for <code>wake-lock</code> is <code>'self'</code>.</p>3536<h2 id="Specifications">Specifications</h2>3738<table class="standard-table">39 <thead>40 <tr>41 <th scope="col">Specification</th>42 <th scope="col">Status</th>43 <th scope="col">Comment</th>44 </tr>45 </thead>46 <tbody>47 <tr>48 <td>{{SpecName('Feature Policy')}}</td>49 <td>{{Spec2('Feature Policy')}}</td>50 <td>Initial definition.</td>51 </tr>52 <tr>53 <td><a href="https://www.w3.org/TR/2017/CR-wake-lock-20171214/">Wake Lock API 1</a></td>54 <td>Candidate Recommendation</td>55 <td>Initial definition of <code>wake-lock</code> feature directive.</td>56 </tr>57 </tbody>58</table>5960<h2 id="Browser_compatibility">Browser compatibility</h2>6162<div class="hidden">63<p>The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>64</div>6566<p>{{Compat('http.headers.Feature-Policy.wake-lock')}}</p>6768<h2 id="See_also">See also</h2>6970<ul>71 <li>{{HTTPHeader('Feature-Policy')}} header</li>72 <li><a href="/en-US/docs/Web/HTTP/Feature_Policy">Feature Policy</a></li>73 <li><a href="/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">Using Feature Policy</a></li>74 <li><a href="https://www.w3.org/TR/wake-lock/#wake-locks">Default value of the allow list</a></li> ...
wakelock-enabled-by-feature-policy-attribute.https.sub.html
Source:wakelock-enabled-by-feature-policy-attribute.https.sub.html
...14 'WakeLock.request("screen")',15 t,16 same_origin_src,17 expect_feature_available_default,18 "wake-lock"19 );20 }, 'Feature policy "wake-lock" can be enabled in same-origin iframe using allow="wake-lock" attribute');21 async_test(t => {22 test_feature_availability(23 'WakeLock.request("screen")',24 t,25 cross_origin_src,26 expect_feature_available_default,27 "wake-lock"28 );29 }, 'Feature policy "wake-lock" can be enabled in cross-origin iframe using allow="wake-lock" attribute');30</script>...
Browser Support For Safari on iOS Versions
Browser Support For Android Browser Versions
Browser Support For Chrome for Android Versions
Browser Support For Firefox for Android Versions
Browser Support For Samsung Internet Versions
Debug webpages on the go with LT Debug Chrome extension.
Add to ChromeTest your website on 3000+ real browsers and operating systems for mobile and desktop with the LambdaTest cloud. Perform browser compatibility test for Screen Wake Lock API and many more web technologies that are a part of your website or web-application.
Last Modified date
2023-03-20
Data sourced from
Debug webpages on the go with LT Debug Chrome extension.
Add to ChromeHarness the power of Chromium-based engine to deliver responsive websites and web apps.
Try for freeGet 100 minutes of automation test minutes FREE!!