Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
arale-iframe-shim
Advanced tools
工具类,在 IE6 下生成 iframe 遮挡 select 和 object。此组件对开发者透明,开发者无需再判断浏览器版本。
工具类,在 IE6 下生成 iframe 遮挡 select。此组件对开发者透明,开发者无需再判断浏览器版本。
☂
new Shim(target)
组件会根据传入的目标元素生成一个实例,实例化后会生成一个 iframe 插入到目标元素前,这样 iframe 的层级永远低于目标元素。
开发者需要手动调用 sync
方法来同步 iframe 和目标元素。
如果是 ie6 以外的浏览器只会返回一个空实例,什么都不执行。
参数 target
是需要被遮挡的目标元素,可以传 DOM Element
或 Selector
。
define(function(require, exports, module) {
var Shim = require('iframe-shim');
var shim = new Shim('#target');
shim.sync();
});
注意:
shim.sync()
实例方法,此方法会根据目标元素的变化而改变 iframe 的样式。
有以下几种情况 iframe 会改变:
display: none
,iframe 会隐藏。sync 可进行链式操作,上面的例子可直接一行完成:
var shim = new Shim('#target').sync();
注意:
sync
方法:target.show();
shim.sync(); // 在 target 显示之后,再同步 shim 的显示。
shim.destroy()
实例方法,销毁 iframe 等。
1.1.0
improved
升级到 spm@3.x 规范。
FAQs
工具类,在 IE6 下生成 iframe 遮挡 select 和 object。此组件对开发者透明,开发者无需再判断浏览器版本。
The npm package arale-iframe-shim receives a total of 1 weekly downloads. As such, arale-iframe-shim popularity was classified as not popular.
We found that arale-iframe-shim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.