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

blacklight-frontend

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blacklight-frontend - npm Package Compare versions

Comparing version 8.0.0-beta.1 to 8.0.0-beta.2

9

app/assets/javascripts/blacklight/blacklight.esm.js

@@ -266,6 +266,11 @@ const Blacklight = function() {

// Add the passed in contents to the modal and display it.
modal.receiveAjax = function (contents) {
modal.receiveAjax = function (contents) {
const domparser = new DOMParser();
const dom = domparser.parseFromString(contents, "text/html");
const elements = dom.querySelectorAll(`${modal.containerSelector} > *`);
// If there is a containerSelector on the document, use it's children.
let elements = dom.querySelectorAll(`${modal.containerSelector} > *`);
if (element.length == 0) {
// If the containerSelector wasn't found, use the whole document
elements = dom.querySelectorAll(`*`);
}
document.querySelector(`${modal.modalSelector} .modal-content`).replaceChildren(...elements);

@@ -272,0 +277,0 @@

@@ -272,6 +272,11 @@ (function (global, factory) {

// Add the passed in contents to the modal and display it.
modal.receiveAjax = function (contents) {
modal.receiveAjax = function (contents) {
const domparser = new DOMParser();
const dom = domparser.parseFromString(contents, "text/html");
const elements = dom.querySelectorAll(`${modal.containerSelector} > *`);
// If there is a containerSelector on the document, use it's children.
let elements = dom.querySelectorAll(`${modal.containerSelector} > *`);
if (element.length == 0) {
// If the containerSelector wasn't found, use the whole document
elements = dom.querySelectorAll(`*`);
}
document.querySelector(`${modal.modalSelector} .modal-content`).replaceChildren(...elements);

@@ -278,0 +283,0 @@

{
"name": "blacklight-frontend",
"version": "8.0.0-beta.1",
"version": "8.0.0-beta.2",
"description": "[![Build Status](https://travis-ci.com/projectblacklight/blacklight.png?branch=main)](https://travis-ci.com/projectblacklight/blacklight) [![Gem Version](https://badge.fury.io/rb/blacklight.png)](http://badge.fury.io/rb/blacklight) [![Coverage Status](https://coveralls.io/repos/github/projectblacklight/blacklight/badge.svg?branch=main)](https://coveralls.io/github/projectblacklight/blacklight?branch=main)",

@@ -5,0 +5,0 @@ "main": "app/assets/javascripts/blacklight",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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