npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

msc-any-fullscreen-popup

v1.0.2

Published

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.

Downloads

4

Readme

msc-any-fullscreen-popup

Published on webcomponents.org DeepScan grade

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. Once the user has granted the permission, Developers could use window.open method to do this fullscreen popup action.(For more detail check this page -「New origin trial for fullscreen popup windows」)

<msc-any-fullscreen-popup /> is a web component which wrap this feature. Developers could apply it to any element they like.

Basic Usage

<msc-any-fullscreen-popup /> is a web component. All we need to do is put the required script into your HTML document. Then follow <msc-any-fullscreen-popup />'s html structure and everything will be all set.

  • Required Script
<script
  type="module"
  src="https://your-domain/wc-msc-any-fullscreen-popup.js">        
</script>
  • Structure

Put <msc-any-fullscreen-popup /> into HTML document. It will have different functions and looks with attribute mutation.

<msc-any-fullscreen-popup>
  <script type="application/json">
    {
      "winwidth": 450,
      "winheight": 300,
      "url": "https://developer.chrome.com/"
    }
  </script>

  <!-- Put any HTML element you like -->
  <button
    type="button"
    class="element-i-like-to-have-fullscreen-popup"
  >
    ...
    ...
    ...
  </button>
</msc-any-fullscreen-popup>

Otherwise, developers could also choose remoteconfig to fetch config for <msc-any-fullscreen-popup />.

<msc-any-fullscreen-popup
  remoteconfig="https://your-domain/api-path"
>
  ...
</msc-any-fullscreen-popup>

JavaScript Instantiation

<msc-any-fullscreen-popup /> could also use JavaScript to create DOM element. Here comes some examples.

<script type="module">
import { MscAnyFullscreenPopup } from 'https://your-domain/wc-msc-any-fullscreen-popup.js';

const template = document.querySelector('.my-template');

// use DOM api
const nodeA = document.createElement('msc-any-fullscreen-popup');
document.body.appendChild(nodeA);
nodeA.appendChild(template.content.cloneNode(true));
nodeA.url = 'https://developer.chrome.com/';

// new instance with Class
const nodeB = new MscAnyFullscreenPopup();
document.body.appendChild(nodeB);
nodeB.appendChild(template.content.cloneNode(true));
nodeB.winwidth = 450;
nodeB.winheight = 300;
nodeB.url = 'https://developer.chrome.com/';

// new instance with Class & default config
const config = {
  winwidth: 450,
  winheight: 300,
  url: 'https://developer.chrome.com/'
};
const nodeC = new MscAnyFullscreenPopup(config);
document.body.appendChild(nodeC);
nodeC.appendChild(template.content.cloneNode(true));
</script>

Attributes

<msc-any-fullscreen-popup /> supports some attributes to let it become more convenience & useful.

  • winwidth

Set popup window width. Default is empty string.(Once winwidth & winheight not set, popup window size will be current viewport size.)

<msc-any-fullscreen-popup winwidth="450">
  ...
</msc-any-fullscreen-popup>
  • winheight

Set popup window height. Default is is empty string.(Once winwidth & winheight not set, popup window size will be current viewport size.)

<msc-any-fullscreen-popup winheight="300">
  ...
</msc-any-fullscreen-popup>
  • url

Set url addess for popup window. Default is is empty string.

<msc-any-fullscreen-popup url="https://developer.chrome.com/">
  ...
</msc-any-fullscreen-popup>

Properties

| Property Name | Type | Description | | ----------- | ----------- | ----------- | | winwidth | Number | Getter / Setter for popup window width. Default is empty string.(Once winwidth & winheight not set, popup window size will be current viewport size.) | | winheight | Number | Getter / Setter for popup window height. Default is empty string.(Once winwidth & winheight not set, popup window size will be current viewport size.) | | url | String | Getter / Setter url addess for popup window. Default is empty string. |

Methods

| Method Signature | Description | | ----------- | ----------- | | popup() | Popup window.(requires a user gesture) |

Events

| Event Signature | Description | | ----------- | ----------- | | msc-any-fullscreen-popup-click | Fired when <msc-any-fullscreen-popup /> clicked. | | msc-any-fullscreen-popup-error | Fired when error occured. Developers could get message througn event.detatil. |

Reference