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

@rallie/load-html

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rallie/load-html - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

20

dist/index.es.js

@@ -58,3 +58,5 @@ /*! *****************************************************************************

invalidHtmlPath: function (basePath) { return message("Invalid html path: ".concat(basePath)); },
invalidEntirePath: function (base, src) { return message("Can not construct a url by the base '".concat(base, "' and the path '").concat(src, "'")); }
invalidEntirePath: function (base, src) {
return message("Can not construct a url by the base '".concat(base, "' and the path '").concat(src, "'"));
},
};

@@ -75,3 +77,3 @@ var getEntirePath = function (src, base, regardHtmlPathAsRoot) {

var _protocol = protocol === '//' ? 'http://' : protocol;
url = (new URL(src, _protocol + prePath)).href;
url = new URL(src, _protocol + prePath).href;
if (protocol === '//') {

@@ -110,3 +112,5 @@ url = url.slice(5);

fragment.innerHTML = html;
var scripts = Array.from(fragment.querySelectorAll('script')).map(function (element) { return cloneElement(element); }).map(function (element) {
var scripts = Array.from(fragment.querySelectorAll('script'))
.map(function (element) { return cloneElement(element); })
.map(function (element) {
var src = element.getAttribute('src');

@@ -118,3 +122,5 @@ if (transferPath && src) {

});
var links = Array.from(fragment.querySelectorAll('link')).map(function (element) { return cloneElement(element); }).map(function (element) {
var links = Array.from(fragment.querySelectorAll('link'))
.map(function (element) { return cloneElement(element); })
.map(function (element) {
var href = element.getAttribute('href');

@@ -126,3 +132,5 @@ if (transferPath && href) {

});
var styles = Array.from(fragment.querySelectorAll('style')).map(function (element) { return cloneElement(element); });
var styles = Array.from(fragment.querySelectorAll('style')).map(function (element) {
return cloneElement(element);
});
return {

@@ -132,3 +140,3 @@ root: rootSelector ? fragment.querySelector(rootSelector) : null,

links: links,
styles: styles
styles: styles,
};

@@ -135,0 +143,0 @@ };

@@ -64,3 +64,5 @@ (function (global, factory) {

invalidHtmlPath: function (basePath) { return message("Invalid html path: ".concat(basePath)); },
invalidEntirePath: function (base, src) { return message("Can not construct a url by the base '".concat(base, "' and the path '").concat(src, "'")); }
invalidEntirePath: function (base, src) {
return message("Can not construct a url by the base '".concat(base, "' and the path '").concat(src, "'"));
},
};

@@ -81,3 +83,3 @@ var getEntirePath = function (src, base, regardHtmlPathAsRoot) {

var _protocol = protocol === '//' ? 'http://' : protocol;
url = (new URL(src, _protocol + prePath)).href;
url = new URL(src, _protocol + prePath).href;
if (protocol === '//') {

@@ -116,3 +118,5 @@ url = url.slice(5);

fragment.innerHTML = html;
var scripts = Array.from(fragment.querySelectorAll('script')).map(function (element) { return cloneElement(element); }).map(function (element) {
var scripts = Array.from(fragment.querySelectorAll('script'))
.map(function (element) { return cloneElement(element); })
.map(function (element) {
var src = element.getAttribute('src');

@@ -124,3 +128,5 @@ if (transferPath && src) {

});
var links = Array.from(fragment.querySelectorAll('link')).map(function (element) { return cloneElement(element); }).map(function (element) {
var links = Array.from(fragment.querySelectorAll('link'))
.map(function (element) { return cloneElement(element); })
.map(function (element) {
var href = element.getAttribute('href');

@@ -132,3 +138,5 @@ if (transferPath && href) {

});
var styles = Array.from(fragment.querySelectorAll('style')).map(function (element) { return cloneElement(element); });
var styles = Array.from(fragment.querySelectorAll('style')).map(function (element) {
return cloneElement(element);
});
return {

@@ -138,3 +146,3 @@ root: rootSelector ? fragment.querySelector(rootSelector) : null,

links: links,
styles: styles
styles: styles,
};

@@ -141,0 +149,0 @@ };

{
"name": "@rallie/load-html",
"version": "0.7.1",
"description": "a middleware to load resources from html",
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
"types": "./dist/index.d.ts",
"author": "Philip Lau",
"license": "MIT",
"files": [
"dist"
],
"scripts": {
"build": "rollup -c rollup.config.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ralliejs/rallie.git"
},
"bugs": {
"url": "https://github.com/ralliejs/rallie/issues"
},
"homepage": "https://github.com/ralliejs/rallie#readme",
"devDependencies": {
"@rallie/core": "^0.7.1"
},
"gitHead": "dade5d8a9a43fbf0f6c3412d54937f7174de5ddd"
"name": "@rallie/load-html",
"version": "0.8.0",
"description": "a middleware to load resources from html",
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
"types": "./dist/index.d.ts",
"author": "Philip Lau",
"license": "MIT",
"files": [
"dist"
],
"scripts": {
"build": "rollup -c rollup.config.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ralliejs/rallie.git"
},
"bugs": {
"url": "https://github.com/ralliejs/rallie/issues"
},
"homepage": "https://github.com/ralliejs/rallie#readme",
"devDependencies": {
"@rallie/core": "^0.8.0"
},
"gitHead": "a14f06d8fe4087ca2f468de493d43ca7ccec399c"
}
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