Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Add missing HTML reserved keyword #6000

Closed
3 tasks done
Sukaato opened this issue Sep 26, 2024 · 1 comment · Fixed by #6001
Closed
3 tasks done

bug: Add missing HTML reserved keyword #6000

Sukaato opened this issue Sep 26, 2024 · 1 comment · Fixed by #6001
Labels

Comments

@Sukaato
Copy link
Contributor

Sukaato commented Sep 26, 2024

Prerequisites

Stencil Version

4.21

Current Behavior

the file src/compiler/transformers/reserved-public-members.ts does not have all reserved HTML keyword, and sometimes it can have unexpected behavior

(eg: if you have a popover property to store HTMLElement, in development mode it work perfectly fine, but when the web-component is transformed into Vue component the popover is reflected on HTML, and broke the style and the HTML

Expected Behavior

Warn the developer about new reserved keyword

System Info

System: node 20.16.0
    Platform: linux (5.15.153.1-microsoft-standard-WSL2)
   CPU Model: AMD Ryzen 7 5700X 8-Core Processor (16 cpus)
    Compiler: /home/sukaato/projects/poppy-ui/node_modules/@stencil/core/compiler/stencil.js
       Build: 1722623140
     Stencil: 4.20.0 🚐
  TypeScript: 5.5.3
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

  1. Run sh demo.sh (install project)
  2. Run npm start -w @test/core to see how stencil handle the keyword popover in dev.
  3. Run npm start -w @test/demo to see how outside stencil the keyword popover is handled.

Code Reproduction URL

https://github.com/Sukaato/stencil-reserved-keyword

Additional Information

Add the reserved keyword to src/compiler/transformers/reserved-public-members.tsin HTML_ELEMENT_KEYS array.

@ionitron-bot ionitron-bot bot added the triage label Sep 26, 2024
Sukaato added a commit to Sukaato/stencil that referenced this issue Sep 26, 2024
Sukaato added a commit to Sukaato/stencil that referenced this issue Sep 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 27, 2024
@christian-bromann
Copy link
Member

A fix for this has been released in Stencil v4.22.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants