https://github.com/dsappet/stenciljs-e2e-setcontent
An implementation of setContent to replace stencil's override and implement some missing functionality
https://github.com/dsappet/stenciljs-e2e-setcontent
Last synced: 22 days ago
JSON representation
An implementation of setContent to replace stencil's override and implement some missing functionality
- Host: GitHub
- URL: https://github.com/dsappet/stenciljs-e2e-setcontent
- Owner: dsappet
- License: mit
- Created: 2020-02-23T04:08:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T09:41:06.000Z (over 3 years ago)
- Last Synced: 2025-08-29T10:31:48.916Z (9 months ago)
- Language: TypeScript
- Size: 2.31 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stenciljs-e2e-setcontent
An implementation of puppeteer `setContent()` to replace stencil's override and implement some missing functionality, specifically `addScriptTag()` and `addStyleTag()`
## Prove it
A demo stencil app was add under /demo, this demo app has an e2e test where we include a simple remote script that sets a variable. The tests prove that the script executed correctly with the custom implementation and not with addscipttag()
`cd demo`
`npm run test`
## Why?
Stencil has created their own implementations of some puppeteer pieces. This means that it is easy to reference puppeteer documentation expecting functions to work only to be frustrated before eventually digging through stencil source to find out they override things.
This particular example is about `addScriptTag` and `addStyleTag`. These functions are very useful when dealing with a real enterprise application that requires 3rd party or even cdn distributed scripts or styles.