Comparing version 4.6.0 to 4.6.1
@@ -164,3 +164,6 @@ import { directive, render } from 'https://unpkg.com/lit-html@^1.0.0/lit-html.js'; | ||
} | ||
attributeChangedCallback(name, _, newValue) { | ||
attributeChangedCallback(name, oldValue, newValue) { | ||
if (oldValue === newValue) { | ||
return; | ||
} | ||
let val = newValue === '' ? true : newValue; | ||
@@ -189,6 +192,11 @@ Reflect.set(this, toCamelCase(name), val); | ||
set(target, key, value, receiver) { | ||
let desc; | ||
if (key in target) { | ||
desc = Object.getOwnPropertyDescriptor(target, key); | ||
if (desc && desc.set) { | ||
desc.set.call(receiver, value); | ||
return true; | ||
} | ||
Reflect.set(target, key, value); | ||
} | ||
let desc; | ||
if (typeof key === 'symbol' || key[0] === '_') { | ||
@@ -195,0 +203,0 @@ desc = { |
@@ -36,3 +36,6 @@ import { BaseScheduler } from './scheduler.js'; | ||
} | ||
attributeChangedCallback(name, _, newValue) { | ||
attributeChangedCallback(name, oldValue, newValue) { | ||
if (oldValue === newValue) { | ||
return; | ||
} | ||
let val = newValue === '' ? true : newValue; | ||
@@ -62,6 +65,11 @@ Reflect.set(this, toCamelCase(name), val); | ||
set(target, key, value, receiver) { | ||
let desc; | ||
if (key in target) { | ||
desc = Object.getOwnPropertyDescriptor(target, key); | ||
if (desc && desc.set) { | ||
desc.set.call(receiver, value); | ||
return true; | ||
} | ||
Reflect.set(target, key, value); | ||
} | ||
let desc; | ||
if (typeof key === 'symbol' || key[0] === '_') { | ||
@@ -68,0 +76,0 @@ desc = { |
{ | ||
"name": "haunted", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"description": "Hooks for web components", | ||
@@ -5,0 +5,0 @@ "main": "lib/haunted.js", |
12
web.js
@@ -164,3 +164,6 @@ import { directive, render } from '../lit-html/lit-html.js'; | ||
} | ||
attributeChangedCallback(name, _, newValue) { | ||
attributeChangedCallback(name, oldValue, newValue) { | ||
if (oldValue === newValue) { | ||
return; | ||
} | ||
let val = newValue === '' ? true : newValue; | ||
@@ -189,6 +192,11 @@ Reflect.set(this, toCamelCase(name), val); | ||
set(target, key, value, receiver) { | ||
let desc; | ||
if (key in target) { | ||
desc = Object.getOwnPropertyDescriptor(target, key); | ||
if (desc && desc.set) { | ||
desc.set.call(receiver, value); | ||
return true; | ||
} | ||
Reflect.set(target, key, value); | ||
} | ||
let desc; | ||
if (typeof key === 'symbol' || key[0] === '_') { | ||
@@ -195,0 +203,0 @@ desc = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74352
1732