Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cocreate/elements

Package Overview
Dependencies
Maintainers
0
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/elements - npm Package Compare versions

Comparing version 1.36.1 to 1.36.2

2

package.json
{
"name": "@cocreate/elements",
"version": "1.36.1",
"version": "1.36.2",
"description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",

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

@@ -22,3 +22,3 @@ import observer from '@cocreate/observer';

if (!src || /{{\s*([\w\W]+)\s*}}/g.test(src))
return;
continue;

@@ -25,0 +25,0 @@ let initialize = initializing.get(element)

@@ -100,14 +100,22 @@ /********************************************************************************

if (['INPUT', 'TEXTAREA', 'SELECT'].includes(el.tagName)
|| (el.hasAttribute('contenteditable') && el.getAttribute('contenteditable') !== 'false')
|| el.contenteditable) {
el.addEventListener('input', function (e) {
const { object, key, isRealtime, isCrdt } = getAttributes(el);
if (!isRealtime || isRealtime === "false" || key === "_id") return;
if (isCrdt == "true" && object && object !== 'pending') return
if (e.detail && e.detail.skip == true) return;
if (data.type !== 'object' && data[data.type] === 'pending') return
if (el.tagName === "EDITOR")
console.log('editor event added')
if (!el.elementsInputEvent) {
el.elementsInputEvent = true;
save(el);
});
if (['INPUT', 'TEXTAREA', 'SELECT'].includes(el.tagName)
|| (el.hasAttribute('contenteditable') && el.getAttribute('contenteditable') !== 'false')
|| el.contenteditable) {
el.addEventListener('input', function (e) {
if (el.pendingObject) return
const { object, key, isRealtime, isCrdt } = getAttributes(el);
if (!isRealtime || isRealtime === "false" || key === "_id") return;
if (isCrdt == "true" && object && object !== 'pending') return
if (e.detail && e.detail.skip == true) return;
if (data.type !== 'object' && data[data.type] === 'pending') return
save(el);
});
}
}

@@ -114,0 +122,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc