Socket
Socket
Sign inDemoInstall

cytoscape-dom-node

Package Overview
Dependencies
9
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.2.0

2

package.json
{
"name": "cytoscape-dom-node",
"version": "1.1.1",
"version": "1.2.0",
"description": "Cytoscape extension for making nodes into DOM elements",

@@ -5,0 +5,0 @@ "keywords": [

@@ -62,2 +62,20 @@ # cytoscape-dom-node

### Skip Node Append
The `skip_node_append` option is a boolean flag (passed with node data) that controls whether the `cytoscape-dom-node` appends the provided node to the provided DOM container.
By default, this option is set to false, meaning the `cytoscape-dom-node` will append the node to the container.
However, in certain scenarios, such as when using EmberJS or another front-end framework, you might have already rendered the nodes to the DOM.
In these cases, you can set `skip_node_append` to true to prevent the library from appending the node, allowing you to maintain control over the node's rendering process.
```js
let div = document.querySelector("#alreadyRenderedNodeId");
cy.add({
'data': {
'id': id,
'dom': div,
'skip_node_append': true,
}
})
```
## Options

@@ -64,0 +82,0 @@

@@ -73,3 +73,5 @@ class CytoscapeDomNode {

this._nodes_dom_container.appendChild(data.dom);
if (data.skip_node_append !== true) {
this._nodes_dom_container.appendChild(data.dom);
}
data.dom.__cy_id = n.id();

@@ -76,0 +78,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc