google-chrome

Alternative for display:contents in Chrome?

对着背影说爱祢 提交于 2020-12-08 07:06:11
问题 What is the alternate solution to implement the following in chrome. display:contents; Currently only firefox supports them in all versions. Is there any other way to get the same features as this css tag. 回答1: You can use an alternative approach, instead using display:content (that is marked as experimental at the moment) you can create a container class and add the property display:grid , and, in case the browser supports display:content use it with this code: @supports (display: contents)

Alternative for display:contents in Chrome?

*爱你&永不变心* 提交于 2020-12-08 07:05:54
问题 What is the alternate solution to implement the following in chrome. display:contents; Currently only firefox supports them in all versions. Is there any other way to get the same features as this css tag. 回答1: You can use an alternative approach, instead using display:content (that is marked as experimental at the moment) you can create a container class and add the property display:grid , and, in case the browser supports display:content use it with this code: @supports (display: contents)

Close/exit a PWA programmatically

霸气de小男生 提交于 2020-12-08 05:51:19
问题 How can I close/exit my PWA? I had assumed I'd be able to do this: window.close(); Unfortunately, that results in the usual error: Scripts may close only the windows that were opened by it. Is there any way to programmatically close my PWA? 回答1: So following MDN documentation on this: window.close In the past, when you called the window object's close() method directly, rather than calling close() on a window instance, the browser closed the frontmost window, whether your script created that

Get shadow root host element

∥☆過路亽.° 提交于 2020-12-08 05:23:32
问题 When inserting a script into the shadow root of an element is there a way to refer to the host element? var element = document.createElement('div'); var script = document.createElement('script'); script.innerHTML = 'console.log(host)'; // << How to get host element?? var shadow = element.createShadowRoot(); shadow.appendChild(script); document.body.appendChild(element); http://jsfiddle.net/9b1vyu4n/ 回答1: Node.getRootNode() was introduced in 2016. You can now access the host element like so:

Service Worker not working for Mobile Web (Chrome, Firefox, IE)

你。 提交于 2020-12-06 12:14:05
问题 I set up a service worker for a static web application that needs to work on mobile phones. I'm using react/webpack2 for this application. Service Worker installs and works greatly when I open the application via desktop, but when I try to visit the application through mobile, it does not install. When SW finishes installing, it gives you an alert message ("onInstalled"); https://abo-deg.surge.sh (here is an example) https://abo-deg.surge.sh/survey/background https://github.com/strongharris

Service Worker not working for Mobile Web (Chrome, Firefox, IE)

元气小坏坏 提交于 2020-12-06 12:11:21
问题 I set up a service worker for a static web application that needs to work on mobile phones. I'm using react/webpack2 for this application. Service Worker installs and works greatly when I open the application via desktop, but when I try to visit the application through mobile, it does not install. When SW finishes installing, it gives you an alert message ("onInstalled"); https://abo-deg.surge.sh (here is an example) https://abo-deg.surge.sh/survey/background https://github.com/strongharris

Cannot use chrome_settings_overrides for overriding Search Provider

二次信任 提交于 2020-12-06 06:58:47
问题 I have the following declaration in my manifest.json , following Google's instructions: { ... "chrome_settings_overrides": { "search_provider": { "name": "My Name", "keyword": "My Keyword", "favicon_url": "icon32.png", "search_url": "http://example.com/Home/Search?keyword={searchTerms}", "encoding": "UTF-8", "is_default": true } }, ... } However, I cannot load the manifest with that part at all (removing it will make it work). The message is receive is: Failed to load extension from: D:

Vue.js devtools not showing

穿精又带淫゛_ 提交于 2020-12-06 06:39:51
问题 Suddenly my Vue.js devtools stopped working. I had it in the chrome for like 2 years (since I started developing Vue.js). Now I can't see devtools in chrome. It happened yesterday just like that - I was using devtools for a while, then I was working on something else and after a while, I noticed something - devtools is away. Even though the extension is saying that devtools works: Why it is not "my" problem: I use it for 2 years with no problem, until now It was working in the morning, then

How to change the Android navigation bar color in a PWA?

北城余情 提交于 2020-12-06 02:59:12
问题 I would like to change the color of the Android navigation bar on the web when I add the page on the Android home screen (Progessive Web App) but when I open the PWA, the color of the Android navigation bar is black and I want Change the color to white. In the manifest, you can change the color of the theme and I do, but still follow the color black. Is it possible to do that? Edit I mean the Android navigation bar, not the notification bar. Edit I upload the image in dropbox because Stack

Chrome Extension: Extension context invalidated when getting URL

本小妞迷上赌 提交于 2020-12-05 11:35:11
问题 I'm retrieving some images from one of my chrome extension folders to the website DOM and everytime I reload the extension I'm getting a 'Extension Context Invalidated' error. Same thing happens when I do a 'chrome.storage.local.set'. Doing some research I have realized that this error has to do with the facts well explained on this answer but since I'm not messaging between my content script and the background.js I wonder why this happens. This is the part of my script (injected via chrome