Giter Club home page Giter Club logo

Comments (2)

betatim avatar betatim commented on May 14, 2024

I also have the "appending content" problem. But only if I use this library by import "@github/time-elements" in my bundle.js which webpack processes. If instead I add <script type="module" src="https://unpkg.com/@github/[email protected]?module"></script> to my HTML file the problem doesn't appear (both when adding this script tag to <head> or just before the closing </body>).

What is weird is that all the steps I can step through with the debugger where something is assigned to this.textContent assign the correct thing. It is only when we return from https://github.com/github/time-elements/blob/40f3d1abb9a1271607182704fa949b5867f94496/src/local-time-element.ts#L133 (or that is how it looks in the debugger) that the old text content of the tag is added in again.

I think my webpack setup is fairly pedestrian. One thing to note is that I don't have a polyfill installed but I think that is Ok because my browser is Firefox 90.0b10 (64-bit).

The bundle is about 100kB and loaded via <script src="dist/bundle.js"></script> in the <head>.

Somehow this feels like there is a race between two things or me not correctly initialising the time-elements library :-/

from relative-time-element.

keithamus avatar keithamus commented on May 14, 2024

If you'd like to try the new release I believe this issue is likely fixed. If not let me know and we can revisit it.

from relative-time-element.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.