Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6357519

Browse files
committed
Fix issues
1 parent 7cf1828 commit 6357519

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

examples/index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,17 @@ <h2>Localised Dates</h2>
200200
</relative-time>
201201
</p>
202202

203-
204203
<button class="js-toggle-aria-hidden">
205204
With aria-hidden
206205
<relative-time aria-hidden="true" datetime="1970-01-01T00:00:00.000Z">
207206
</relative-time>
208207
</button>
209-
<script type="module" src="../dist/index.js"></script>
210-
<!-- <script type="module" src="https://unpkg.com/@github/relative-time-element@latest/dist/bundle.js"></script> -->
208+
209+
<!-- <script type="module" src="../dist/index.js"></script> -->
210+
<script type="module" src="https://unpkg.com/@github/relative-time-element@latest/dist/bundle.js"></script>
211211
<script>
212212
document.body.addEventListener('relative-time-updated', event => {
213-
// console.log('event from', event.target, event)
213+
console.log('event from', event.target, event)
214214
});
215215
document.getElementById('dynamic1').date = new Date()
216216
document.getElementById('dynamic2').date = new Date(Date.now() - 30000)
@@ -220,7 +220,6 @@ <h2>Localised Dates</h2>
220220
document.getElementById('lazy').setAttribute('datetime', new Date().toJSON())
221221
}, 1000)
222222

223-
224223
const toggleAriaHidden = (event) => {
225224
const relativeTimeElement = event.currentTarget.querySelector('relative-time')
226225
if (relativeTimeElement.getAttribute('aria-hidden') === 'true') {
@@ -231,7 +230,6 @@ <h2>Localised Dates</h2>
231230
}
232231
const button = document.querySelector('.js-toggle-aria-hidden')
233232
button.addEventListener('click', toggleAriaHidden)
234-
235233
</script>
236234
</body>
237235
</html>

0 commit comments

Comments
 (0)