New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scribe-editor

Package Overview
Dependencies
Maintainers
9
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scribe-editor - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 1.2.4
Changes the way that root nodes are detected, the code now uses the element that the Scribe instance is bound to rather than looking for contenteditable attributes.
# 1.2.3

@@ -2,0 +6,0 @@

2

package.json
{
"name": "scribe-editor",
"version": "1.2.3",
"version": "1.2.4",
"main": "src/scribe.js",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -12,6 +12,5 @@ define(function () {

// TODO: write tests. unit or integration?
Node.prototype.getAncestor = function (nodeFilter) {
Node.prototype.getAncestor = function (rootElement, nodeFilter) {
var isTopContainerElement = function (element) {
return element && element.attributes
&& element.attributes.getNamedItem('contenteditable');
return rootElement === element;
};

@@ -18,0 +17,0 @@ // TODO: should this happen here?

@@ -28,6 +28,5 @@ define([

var node = new scribe.api.Node(this.range.commonAncestorContainer);
var isTopContainerElement = node.node && node.node.attributes
&& node.node.attributes.getNamedItem('contenteditable');
var isTopContainerElement = node.node && scribe.el === node.node;
return ! isTopContainerElement && nodeFilter(node.node) ? node.node : node.getAncestor(nodeFilter);
return ! isTopContainerElement && nodeFilter(node.node) ? node.node : node.getAncestor(scribe.el, nodeFilter);
};

@@ -34,0 +33,0 @@

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