
Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
cmui-action
Advanced tools
English version is here.
轻松随意绑定点击事件!
先定义一些动作:
action.define({
'my-action': function () {
//do something...
},
/* ... */
})
在页面里创建元素:
<button data-action="my-action">btn</button>
<!-- 或这样 -->
<a href="#" data-action="my-action">link</a>
<!-- 或这样 -->
<a href="#my-action" data-action>link</a>
其实已经不需要第三步了。
点击这个元素就可以触发你定义的那个动作了!
依赖以下类库:
支持以下浏览器:
通过 npm 3+ 安装:
$ npm install cmui-action
在页面中加载 Action 的脚本文件及必要的依赖:
<script src="./node_modules/jquery/dist/jquery.js"></script>
<script src="./node_modules/cmui-action/src/action.js"></script>
npm install
,安装必要的依赖。test/test.html
即可运行单元测试。移动 UI 框架 CMUI 采用 Action 作为全局的基础设施,因此所有 CMUI 用户都在使用 Action:
FAQs
Easy and lazy solution for click-event-binding.
We found that cmui-action 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.
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.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.