Coder Social home page Coder Social logo

Comments (4)

bengarrett avatar bengarrett commented on June 15, 2024

Hi @Keith94, thanks for the feedback.

This is a known issue that I haven't worked out how to fix yet.

when tab is not active, tab.status "complete" is not returned by Chrome

Chrome has events that give extensions such as RetroTxt notifications when tabs have been created, changed and closed. There seems to be an inconsistency when using file:/// URLs where Chrome does not tell RetroTxt that a new background tab is complete, i.e. finished loading the local file.

from retrotxt.

bengarrett avatar bengarrett commented on June 15, 2024

The effected code.

eventpage.js Line 601

        if (url.length === 0) { // do nothing
        } else if (tab.active === false && tab.status === "loading" && url.startsWith(`file:///`) === true) {
          // when tab is not active, tab.status "complete" is not returned by Chrome
          runParseEventUrls(`onCreated`, url, tab.id);
        } else if (tab.status === "complete") {
          runParseEventUrls(`onCreated`, url, tab.id);
        }

from retrotxt.

Keith94 avatar Keith94 commented on June 15, 2024

I see, this is Firefox btw if that makes a difference.

from retrotxt.

bengarrett avatar bengarrett commented on June 15, 2024

Unfortunately, I think it's an (intentional?) web extension design flaw regardless of browser.

I remember working on this issue. The current broken system relies on new tab event. The preferred option was the have it depend on the update tab event.

The problem was the update tab event got triggered multiple times, and there was no way to distinguish between a new tab and refresh (F5) updates. So you had an issue where the tab would render with RetroTxt then straight after revert it back to the original text. Having this happen at the same time on multiple background tabs with large text or ANSI files slowed down the browser considerably.

from retrotxt.

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.