Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

msc-any-fullscreen-popup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msc-any-fullscreen-popup - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

17

mjs/wc-msc-any-fullscreen-popup.js

@@ -18,3 +18,4 @@ import { _wcl } from './common-lib.js';

const custumEvents = {
click: 'msc-any-fullscreen-popup-click'
click: 'msc-any-fullscreen-popup-click',
error: 'msc-any-fullscreen-popup-error'
};

@@ -284,2 +285,4 @@ let popupWin;

async _onClick() {
const deniedError = 'Insufficient permissions or user activation.';
try {

@@ -289,3 +292,3 @@ const { state } = await window.navigator.permissions.query({ name:'window-management' });

if (state === 'denied') {
throw new Error('Please allow the Window Management permission for <msc-any-fullscreen-popup /> functionality.');
throw new Error(deniedError);
} else if (state !== 'granted') {

@@ -296,3 +299,11 @@ await window.getScreenDetails();

// other browser might not support Window Management permission
console.warn(`${_wcl.classToTagName(this.constructor.name)}: ${err.message}`);
let { message } = err;
if (message !== deniedError) {
message = 'Window management not supported.';
}
console.warn(`${_wcl.classToTagName(this.constructor.name)}: ${message}`);
this.#fireEvent(custumEvents.error, { message });
}

@@ -299,0 +310,0 @@

2

package.json
{
"name": "msc-any-fullscreen-popup",
"version": "1.0.1",
"version": "1.0.2",
"description": "Imagine the feature to open a popup window in fullscreen mode. With window-management support, user could directly open a popup window in fullscreen mode in just one click.",

@@ -5,0 +5,0 @@ "main": "index.html",

@@ -150,2 +150,3 @@ # msc-any-fullscreen-popup

| msc-any-fullscreen-popup-click | Fired when &lt;msc-any-fullscreen-popup /> clicked. |
| msc-any-fullscreen-popup-error | Fired when error occured. Developers could get message througn `event.detatil`. |

@@ -157,2 +158,3 @@ ## Reference

- [MDN > window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)
- [&lt;msc-any-fullscreen-popup /> demo](https://blog.lalacube.com/mei/webComponent_msc-any-fullscreen-popup.html)
- [YouTube > tutorial](https://youtu.be/Z_uee448gDQ)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc