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

@netflix/x-element

Package Overview
Dependencies
Maintainers
10
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netflix/x-element - npm Package Compare versions

Comparing version 1.0.0-rc.52 to 1.0.0-rc.53

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Custom Element base class.",
"version": "1.0.0-rc.52",
"version": "1.0.0-rc.53",
"license": "SEE LICENSE IN LICENSE",

@@ -8,0 +8,0 @@ "repository": "https://github.com/Netflix/x-element",

@@ -65,4 +65,4 @@ ```

* http://localhost:8080/test
* * http://localhost:8080/performance
* http://localhost:8080/performance
(See [SPEC.md](./SPEC.md) for more details.)

@@ -354,2 +354,30 @@ import XElement from '../x-element.js';

it('html: renders elements with special characters in attributes', () => {
// Note the "/", "<", ">", and "&quot;" characters.
const getTemplate = ({ width, height }) => {
return html`\
<svg
id="svg"
class="<><>&quot;&quot;</></>"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="${ifDefined(width)}"
height="${ifDefined(height)}">
<circle id="circle" r="${width / 2}" cx="${width / 2}" cy="${height / 2}"></circle>
</svg>`;
};
const container = document.createElement('div');
document.body.append(container);
const width = 24;
const height = 24;
render(container, getTemplate({ width, height }));
const svgBox = container.querySelector('#svg').getBoundingClientRect();
assert(svgBox.width === width);
assert(svgBox.height === height);
const circleBox = container.querySelector('#circle').getBoundingClientRect();
assert(circleBox.width === width);
assert(circleBox.height === height);
container.remove();
});
it('html: self-closing tags work', () => {

@@ -356,0 +384,0 @@ const getTemplate = ({ type }) => {

@@ -1065,5 +1065,5 @@ /** Base element class for creating custom elements. */

static #updaters = new WeakMap();
static #ATTRIBUTE = /<[a-zA-Z0-9-]+[^/<>]* ([a-z][a-z-]*)="$/;
static #BOOLEAN_ATTRIBUTE = /<[a-zA-Z0-9-]+[^/<>]* \?([a-z][a-z-]*)="$/;
static #PROPERTY = /<[a-zA-Z0-9-]+[^/<>]* \.([a-z][a-zA-Z0-9_]*)="$/;
static #ATTRIBUTE = /<[a-zA-Z0-9-]+(?:[^/<>]|"[^"]*")* ([a-z][a-z-]*)="$/;
static #BOOLEAN_ATTRIBUTE = /<[a-zA-Z0-9-]+(?:[^/<>]|"[^"]*")* \?([a-z][a-z-]*)="$/;
static #PROPERTY = /<[a-zA-Z0-9-]+(?:[^/<>]|"[^"]*")* \.([a-z][a-zA-Z0-9_]*)="$/;

@@ -1070,0 +1070,0 @@ #type = null;

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