Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
grunt-domman
Advanced tools
Grunt plugin for DOM manipulation
安装插件:
npm install grunt-domman --save-dev
加载 grunt 任务:
grunt.loadNpmTasks('grunt-domman');
在 Gruntfile.js 的 grunt.initConfig
中增加一个命名为 domman
的配置项:
grunt.initConfig({
domman: {
options: {
plugins: ['tms', 'offline'], // 要启用的插件
orderHead: ['offline', 'custom'], // 优先调用的插件
orderTail: [], // 最后要调用的 插件
custom: function ($) {
$('title').text('xxx');
},
},
files: [
{...}
]
},
})
Type: Array
Default value: ['tms', 'offline', '...']
要调用的 dom 操作插件,在 grunt-domman 模块的 plugins 目录下,默认值为 plugins
目录下的所有插件。
Type: Array
Default value: []
需要首先调用的 plugins。
Type: Array
Default value: []
需要最后调用的 plugins。
Type: Function
Default value: null
用户自定义的 dom 操作,如果需要指定这个自定义的操作的位置,在 plugins
、orderHead
和 orderTail
中指定 "custom"
字符串位置即可,默认最后执行
tms
和 offline
插件options.prior
配置项为 options.orderHead
和 options.orderTail
两个配置项custom
配置项定制规则KISSY
或 <script>
标签包含 <main>
的行内 js 默认做 onload 加载Copyright (c) 2014 弘树. Licensed under the MIT license.
FAQs
Grunt plugin for DOM manipulation
The npm package grunt-domman receives a total of 0 weekly downloads. As such, grunt-domman popularity was classified as not popular.
We found that grunt-domman 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.