Last active
November 26, 2016 01:39
-
-
Save aaronshaf/2bb668095085365ecde336e37c5b2e7a to your computer and use it in GitHub Desktop.
Custom Element pattern with i18n
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my-element> | |
<!-- | |
provided content kept active (not inert) | |
.screenreader-only added in Custom Element lifecycle | |
--> | |
<select class="screenreader-only"> | |
<option></option> | |
</select> | |
<template class="intl-messages"> | |
<intl-message msg-id="hello" lang="en-US">Hello, { name }!</intl-message> | |
<intl-message msg-id="hello" lang="es">Hola, { name }!</intl-message> | |
</template> | |
<!-- generated in Custom Element lifecycle; has attached shadow root; possibly hidden from SR --> | |
<div aria-hidden="true"></div> | |
</my-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment