Skip to content
Advertisement

Tag: google-chrome

getCurrentPosition in JS does not work on iOS

I have a page that contains a code that gets the current location from the device and load other stuff based on the location with this code: It works on all android devices that I tested, but on iOS and macOS, it’s not working. Neither if nor else. Seems like it stuck at getting the current location. Any help? Answer

Open jsPDF created pdf in Chrome’s new tab/window

How can I open with javascript link data:application/pdf;filename=generated.pdf;base64;DATA in Chrome 71? Link from console opened successfully, but not from code – unfortunately. The snippet does not work for security reason. Only for code demonstration. I read some similar questions, but did not find an answer. Answer Try window.open() instead. The following code worked for me. You will need to modify

ES6 modules in Chrome

I’m trying to use ES6 modules in Chrome. From all the examples I’ve looked at the following seems to be the right way to do it, but when I run it in Chrome’s developer tools I get this error message… uncaught SyntaxError: Unexpected token { …highlighting the import statement in the module (script1.js, below) that’s trying to import the module.

Can’t find serviceWorker in navigator anymore

since the new update of Google Chrome (version 69.0.3497.92 (official build) (64-bit)) I can’t find the serviceWorker service in the Navigator anymore. Actually I could register my Service Worker as follows but now I get an error that serviceWorker cannot be found in the navigator: How can I now use the Service Worker again, or how can I get it

Mouseleave triggered by click

I have an absolutely-positioned div, and I’m trying to keep track of when the mouse moves over it, and when the mouse leaves. Unfortunately clicking on the text in the box occasionally triggers the mouseleave event. DEMO: js fiddle How can I prevent this? JS HTML CSS Answer This seems to be a bug (I could reproduce it in Chrome

iframe not reading cookies in Chrome

Chrome is not allowing a child iframe to read its own cookies. I have a parent webpage with a child iframe: parent at https://first-site.com child at <iframe src=”https://second-site.com”> (inside of parent) cookie set with path: ‘/’ secure: true httpOnly: false domain: ‘.second-site.com’ I control both sites, and I want the iframe to perform an operation within the iframe that requires

Advertisement