Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120466948
removeStyleElement.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 4, 14:39
Size
604 B
Mime Type
text/html
Expires
Sun, Jul 6, 14:39 (2 d)
Engine
blob
Format
Raw Data
Handle
27193181
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
removeStyleElement.js
View Options
'use strict';
const { detachNodeFromParent } = require('../lib/xast.js');
exports.name = 'removeStyleElement';
exports.type = 'visitor';
exports.active = false;
exports.description = 'removes <style> element (disabled by default)';
/**
* Remove <style>.
*
* https://www.w3.org/TR/SVG11/styling.html#StyleElement
*
* @author Betsy Dupuis
*
* @type {import('../lib/types').Plugin<void>}
*/
exports.fn = () => {
return {
element: {
enter: (node, parentNode) => {
if (node.name === 'style') {
detachNodeFromParent(node, parentNode);
}
},
},
};
};
Event Timeline
Log In to Comment