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

can-stache

Package Overview
Dependencies
Maintainers
16
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-stache - npm Package Compare versions

Comparing version 4.17.5 to 4.17.6

24

helpers/-portal-test.js

@@ -115,3 +115,2 @@ var QUnit = require("steal-qunit");

test("Doesn't do anything if there isn't a place to put the content", function() {
var el = document.createElement("div");
var view = stache("{{#portal(root)}}<span>two</span>{{/portal}}");

@@ -121,4 +120,2 @@ var vm = new DefineMap({ root: null });

console.log(frag.firstChild, el.firstChild);
QUnit.equal(frag.firstChild.nodeType, 8, "Only rendered the comment node");

@@ -144,1 +141,22 @@ });

});
test("Works when DOM nodes are removed outside of stache", function() {
var view = stache("{{#if(show)}}{{#portal(root)}} <span>tests</span> {{/portal}}{{/if}}");
var root = document.createElement("div");
var vm = new DefineMap({ root: root, show: true });
view(vm);
var badScript = function() {
domMutateNode.removeChild.call(root, root.firstChild);
};
badScript();
try {
vm.show = false;
QUnit.ok(true, "Did not throw");
} catch(e) {
QUnit.ok(false, e);
}
});

@@ -31,2 +31,3 @@ var canReflect = require("can-reflect");

function teardown() {
var root = el;
if(el) {

@@ -38,3 +39,7 @@ canReflect.offValue(elementObservable, getElementAndRender);

if(nodeList) {
nodeLists.remove(nodeList);
canReflect.eachListLike(nodeList, function(node) {
if(root === node.parentNode) {
domMutateNode.removeChild.call(root, node);
}
});
nodeList = null;

@@ -41,0 +46,0 @@ }

2

package.json
{
"name": "can-stache",
"version": "4.17.5",
"version": "4.17.6",
"description": "Live binding handlebars templates",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com/doc/can-stache.html",

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