When there are two nested web-components ParentComponent and ChildComponent, and that the parent accesses the child through Shadow DOM, it should be able to access properties and methods from the child component just as in the browser.
Actual Behavior
The below test throws TypeError: this.childComponent.childMethod is not a function;
[INFO] Error: Uncaught TypeError: this.childComponent.childMethod is not a function (http://localhost:8000/demo.test.html?wtr-session-id=7L0lWcdRCn5ILddGDxUF2:178)
[INFO] at N.O (node_modules/lit-html/src/lit-html.ts:1402:52)
[INFO] at N.T (node_modules/lit-html/src/lit-html.ts:1442:35)
[INFO] at N.$ (node_modules/lit-html/src/lit-html.ts:1548:11)
[INFO] at N._$AI (node_modules/lit-html/src/lit-html.ts:1375:11)
[INFO] at Z (node_modules/lit-html/src/lit-html.ts:2169:7)
[INFO] at litFixtureSync (node_modules/@open-wc/testing-helpers/src/litFixture.js:32:3)
[INFO] at litFixture (node_modules/@open-wc/testing-helpers/src/litFixture.js:63:14)
[INFO] at fixture (node_modules/@open-wc/testing-helpers/src/fixture-no-side-effect.js:62:12)
[INFO] at o.<anonymous> (demo.test.html:196:34)
Expected behavior
When there are two nested web-components
ParentComponent
andChildComponent
, and that the parent accesses the child through Shadow DOM, it should be able to access properties and methods from the child component just as in the browser.Actual Behavior
The below test throws
TypeError: this.childComponent.childMethod is not a function
;Additional context
Stack trace:
Dependencies: