Socket
Socket
Sign inDemoInstall

@lit-labs/ssr-dom-shim

Package Overview
Dependencies
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lit-labs/ssr-dom-shim - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

lib/element-internals.d.ts

6

index.d.ts

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

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
export { ariaMixinAttributes, ElementInternals, HYDRATE_INTERNALS_ATTR_PREFIX, } from './lib/element-internals.js';
declare const ElementShimWithRealType: {

@@ -7,0 +3,0 @@ new (): Element;

@@ -6,2 +6,4 @@ /**

*/
import { ElementInternalsShim } from './lib/element-internals.js';
export { ariaMixinAttributes, ElementInternals, HYDRATE_INTERNALS_ATTR_PREFIX, } from './lib/element-internals.js';
const attributes = new WeakMap();

@@ -28,3 +30,5 @@ const attributesForElement = (element) => {

constructor() {
this.__shadowRootMode = null;
this.__shadowRoot = null;
this.__internals = null;
}

@@ -38,2 +42,5 @@ get attributes() {

get shadowRoot() {
if (this.__shadowRootMode === 'closed') {
return null;
}
return this.__shadowRoot;

@@ -54,2 +61,3 @@ }

const shadowRoot = { host: this };
this.__shadowRootMode = init.mode;
if (init && init.mode === 'open') {

@@ -60,2 +68,11 @@ this.__shadowRoot = shadowRoot;

}
attachInternals() {
if (this.__internals !== null) {
throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': ` +
`ElementInternals for the specified element was already attached.`);
}
const internals = new ElementInternalsShim(this);
this.__internals = internals;
return internals;
}
getAttribute(name) {

@@ -62,0 +79,0 @@ const value = attributesForElement(this).get(name);

{
"name": "@lit-labs/ssr-dom-shim",
"version": "1.0.0",
"version": "1.1.0",
"publishConfig": {

@@ -26,3 +26,4 @@ "access": "public"

"files": [
"index.{d.ts,d.ts.map,js,js.map}"
"index.{d.ts,d.ts.map,js,js.map}",
"lib/"
],

@@ -47,2 +48,3 @@ "scripts": {

"output": [
"lib/",
"index.{d.ts,d.ts.map,js,js.map}",

@@ -49,0 +51,0 @@ "tsconfig.tsbuildinfo"

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