diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
index 14d02730e8..09da6e9b41 100644
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -102,7 +102,7 @@ export default function dom(
const body = [];
- const debug_name = `<${component.customElement ? component.tag : name}>`;
+ const debug_name = `<${component.customElement ? component.customElement.tag : name}>`;
const not_equal = component.options.immutable ? `@not_equal` : `@safe_not_equal`;
let dev_props_check;
@@ -141,7 +141,7 @@ export default function dom(
const state = this.$$.get();
${expected.map(name => deindent`
- if (state.${name} === undefined) {
+ if (state.${name} === undefined${component.customElement && ` && !('${name}' in this.attributes)`}) {
console.warn("${debug_name} was created without expected data property '${name}'");
}`)}
`;
@@ -184,6 +184,8 @@ export default function dom(
@init(this, { target: this.shadowRoot }, define, create_fragment, ${not_equal});
+ ${dev_props_check}
+
if (options) {
if (options.target) {
@insert(options.target, this, options.anchor);
diff --git a/test/custom-elements/samples/nested/Counter.html b/test/custom-elements/samples/nested/Counter.html
deleted file mode 100644
index d365ce7644..0000000000
--- a/test/custom-elements/samples/nested/Counter.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
clicked {count} times
\ No newline at end of file diff --git a/test/custom-elements/samples/nested/test.js b/test/custom-elements/samples/nested/test.js deleted file mode 100644 index d6d52426af..0000000000 --- a/test/custom-elements/samples/nested/test.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as assert from 'assert'; -import './main.html'; - -export default async function (target) { - target.innerHTML = '