Skip to content
Advertisement

Tag: google-chrome

How to get FCM token?

I am trying to get FCM token in react js application. First thing i tried is to use messaging.useServiceWorker(registration) then use messaging.getToken() and it’s working fine on localhost for firefox and google chrome, but on an HTTPS live server it works fine on firefox but in chrome it throws an error: DOMException: Failed to execute ‘subscribe’ on ‘PushManager’: Subscription failed

WebHID API: reconnect device

Is it possible to “silently”(without calling navigator.hid.requestDevice) reconnect hid device after it was disconnected and connected with USB cable again? navigator.hid.getDevices is not an option, it doesn’t return device after it was disconnected. Answer Assuming that the device has a serial number so that the browser can recognize it when it reconnects and match it against the permission previously granted

How can I use github to host an external CSS file?

I uploaded my css to github, then went to the file on the site and clicked the raw option. I tried adding it to a webpage, but chrome is giving me the following errors: Resource interpreted as Stylesheet but transferred with MIME type text/plain: “https://raw.githubusercontent.com/me/my-repo/master/style.css”. and Cross-Origin Read Blocking (CORB) blocked cross-origin response https://raw.githubusercontent.com/me/my-repo/master/style.css with MIME type text/plain. See https://www.chromestatus.com/feature/5629709824032768

how to prevent force dark mode by system?

Dark/Light mode toggle settings on websites and app are tredning and there is a some system default theme mode also available like chrome dev-tools provide force dark-mode, but I want my website to be view in the way it has been built. So, How do I prevent the force dark-mode, applied by chrome? I have tried prefers-color-scheme media query, but

Chrome, FileReader API, event.target.result === “”

I have a web app which does some processing on big text-files (> 500mb) via the FileReader API’s readAsText() method. It has been working great for years but suddenly I got empty responses: event.target.result is an empty string. 369MB works but 589MB does not work. I have tested on multiple computers; same result, however it does work in Firefox. Chrome

Advertisement