cssobj-plugin-post-csstext
v1.0.7
Published
https://github.com/cssobj/cssobj-plugin-post-csstext
Downloads
6
Readme
cssobj-plugin-post-csstext
Get cssText from CSSOM.
Install
npm install cssobj/cssobj-plugin-post-csstext
Usage:
Option 1: as a plugin
It must load after plugin-cssom.
var pluginCssText = require('cssobj-plugin-post-csstext')
var result = cssobj(obj)
result.options.plugins.post.push(pluginCssText(callback))
function callback(css) {
// for every time result.update
// css === the whole cssom text of result
}
Option 2: as callback for onUpdate
var result = cssobj(obj, {onUpdate: pluginCssText(callback)})