Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
msc-any-fullscreen-popup
Advanced tools
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.
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.
<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.
<script
type="module"
src="https://your-domain/wc-msc-any-fullscreen-popup.js">
</script>
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>
<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>
<msc-any-fullscreen-popup /> supports some attributes to let it become more convenience & useful.
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>
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>
Set url addess for popup window. Default is is empty string.
<msc-any-fullscreen-popup url="https://developer.chrome.com/">
...
</msc-any-fullscreen-popup>
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. |
Method Signature | Description |
---|---|
popup() | Popup window.(requires a user gesture) |
Event Signature | Description |
---|---|
msc-any-fullscreen-popup-click | Fired when <msc-any-fullscreen-popup /> clicked. |
FAQs
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.
The npm package msc-any-fullscreen-popup receives a total of 0 weekly downloads. As such, msc-any-fullscreen-popup popularity was classified as not popular.
We found that msc-any-fullscreen-popup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.