Relative Content

Tag Archive for javascripthtmlgoogle-chrome

Sequential Message Passing in Chrome Extension through chrome.sendMessage between worker and content

I’m building a Chrome extension that performs Automatic Speech Recognition (ASR) on audio data. The transcription happens in chunks, and I want to send progress updates to the content script while transcription is still in progress. However, I’ve encountered an issue where the updates only seem to be sent after the entire transcription process finishes, rather than in real-time as I would like.

Sequential Message Passing in Chrome Extension through chrome.sendMessage between worker and content

I’m building a Chrome extension that performs Automatic Speech Recognition (ASR) on audio data. The transcription happens in chunks, and I want to send progress updates to the content script while transcription is still in progress. However, I’ve encountered an issue where the updates only seem to be sent after the entire transcription process finishes, rather than in real-time as I would like.

Is there a way to get better image rendering performance in Chrome when scrolling?

I have a container set to display image thumbnails with a css grid. There are about 5000 image elements and if I scroll too fast, Chrome can’t seem to manage to display them quickly enough and it looks like I am scrolling an empty container until I stop and give it a frame or two to catch up. Is there anything I can do to improve the performance? I can get smooth, frame perfect scrolling of 5000 thumbnails if I resort to canvas using ImageBitmap instead of HTMLImageElement, but this adds a lot of extra implementation (not to mention memory usage.)

Chrome and navigating back to a page containing checkboxes: how to keep a consistent state?

In a web page I’m using a javascript triggered by the onclick event of a checkbox to, first, enable/disable a fieldset html element and, second, change accordingly the background color of the legend element to somehow communicate the fieldset‘s enabled/disabled state. When navigating back to a previous page in Chrome what I noticed is that checkboxes in a page are first loaded in their default state on that page and then they are brought back to whatever state they had when navigation away from that page took place. Now, if when navigating back to a page I query the checked state via the $(document).ready method I always get the default state for all checkboxes because the document ready event occurs before checkboxes are brought back to their final state. This post confirms the behavior described above and suggests the window.onpageshow event (instead of the $(document).ready) to query the final state of checkboxes.