Skip to content

Feature/issue 49 inner html#50

Merged
thescientist13 merged 2 commits intomasterfrom
feature/issue-49-inner-html
Jun 10, 2022
Merged

Feature/issue 49 inner html#50
thescientist13 merged 2 commits intomasterfrom
feature/issue-49-inner-html

Conversation

@thescientist13
Copy link
Copy Markdown
Member

@thescientist13 thescientist13 commented Jun 5, 2022

Related Issue

resolves #49

Summary of Changes

  1. Added support for Light DOM (innerHTML) vs Shadow DOM (shadowRoot.innerHTML) rendering
  2. Added test case

TODO

  1. Does this remove the need for lightMode config (breaking change)? - deprecate lightMode configuration option #52
  2. Validate template.cloneNode approach for navigation component in test for browser / standards compliance - DOM shim not accurately creating templates (HTMLTemplateElement) #51
  3. documentation (maybe better as an example?) - added to Go Live checklist - Go Live checklist #17

@thescientist13 thescientist13 added documentation Improvements or additions to the website and / or documentation feature New feature or request question Further information is requested breaking labels Jun 5, 2022
@thescientist13
Copy link
Copy Markdown
Member Author

thescientist13 commented Jun 5, 2022

Yeah, looks like doing this shouldn't work as we have it now

const template = document.createElement('template');

template.innerHTML = `
  <footer>
    <p>
      <a href="https://projectevergreen.github.io">WCC &#9672 Project Evergreen</a>
    </p>
  </footer>
`;

class Footer extends HTMLElement {
  connectedCallback() {
    this.appendChild(template.content.cloneNode(true));
  }
}

export {
  Footer
};

customElements.define('wcc-footer', Footer);

Since based on a quick test in the browser console, the <template> tags should be included
Screen Shot 2022-06-05 at 2 16 00 PM
Screen Shot 2022-06-05 at 2 22 13 PM

Seems like something to fix in dom-shim.js?

@thescientist13 thescientist13 self-assigned this Jun 5, 2022
@thescientist13 thescientist13 force-pushed the feature/issue-49-inner-html branch from 655b766 to 74d18fe Compare June 5, 2022 18:53
@thescientist13 thescientist13 removed the documentation Improvements or additions to the website and / or documentation label Jun 5, 2022
@thescientist13 thescientist13 removed their assignment Jun 5, 2022
@thescientist13 thescientist13 force-pushed the feature/issue-49-inner-html branch from 74d18fe to c02c955 Compare June 10, 2022 11:42
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 10, 2022

Deploy Preview for merry-caramel-524e61 ready!

Name Link
🔨 Latest commit c02c955
🔍 Latest deploy log https://app.netlify.com/sites/merry-caramel-524e61/deploys/62a32e19c26524000b93c4f1
😎 Deploy Preview https://deploy-preview-50--merry-caramel-524e61.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@thescientist13 thescientist13 merged commit 6e2f0ee into master Jun 10, 2022
@thescientist13 thescientist13 deleted the feature/issue-49-inner-html branch June 10, 2022 11:50
thescientist13 added a commit that referenced this pull request Dec 4, 2025
thescientist13 added a commit that referenced this pull request Dec 4, 2025
thescientist13 added a commit that referenced this pull request Dec 6, 2025
thescientist13 added a commit that referenced this pull request Jan 4, 2026
thescientist13 added a commit that referenced this pull request Jan 4, 2026
thescientist13 added a commit that referenced this pull request Jan 4, 2026
thescientist13 added a commit that referenced this pull request Jan 11, 2026
thescientist13 added a commit that referenced this pull request Jan 11, 2026
thescientist13 added a commit that referenced this pull request Jan 11, 2026
thescientist13 added a commit that referenced this pull request Jan 21, 2026
thescientist13 added a commit that referenced this pull request Jan 21, 2026
thescientist13 added a commit that referenced this pull request Jan 21, 2026
thescientist13 added a commit that referenced this pull request Feb 5, 2026
thescientist13 added a commit that referenced this pull request Feb 5, 2026
thescientist13 added a commit that referenced this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking feature New feature or request question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support innerHTML in compiler for custom elements

1 participant