我读这所描述的两个存储的API,在缓存API和IndexedDB的,但它似乎既不存储选项是真正持久的离线存储指南PWA的。Cache API 是临时设计的,当用户清除浏览器缓存时可以擦除 IndexedDB 数据。
那么,是否有可能在 PWA 中拥有真正的持久存储?我想要做的是:
有什么办法可以这样做吗?也许是我不知道的 API?我只需要一个很小的唯一代码,因为这个 PWA 不是为了让用户使用 cookie 登录。
在Foundation中,主要的CSS文件以此开头
meta.foundation-mq-small {
font-family: "/only screen and (max-width: 40em)/";
width: 0em; }
meta.foundation-mq-medium {
font-family: "/only screen and (min-width:40.063em) and (max-width:64em)/";
width: 40.063em; }
meta.foundation-mq-large {
font-family: "/only screen and (min-width:64.063em)/";
width: 64.063em; }
meta.foundation-mq-xlarge {
font-family: "/only screen and (min-width:90.063em)/";
width: 90.063em; }
meta.foundation-mq-xxlarge {
font-family: "/only screen and (min-width:120.063em)/";
width: 120.063em; }
Run Code Online (Sandbox Code Playgroud)
为什么font-family属性中有媒体查询?
随着对PhpStorm 2016.1.1的更新,当我从PhpStorm在自动完成中建议的列表中选择一个函数时,它将在带有红色边框的函数参数中插入变量.
有没有办法禁用注入变量和红色边框,但保持功能名称自动完成?
小提琴: https: //jsfiddle.net/7gj26hqu/
我想要一个MutationObserver
能够检测自身内部所有新节点的节点。在示例中,我设置了{childList: true, subtree: true}
,但div#nested
没有出现在MutationObserver
(在控制台中显示)。
如何让观察者检测子节点的任何深度?
const domObserver = new MutationObserver((records) => {
records.forEach((record) => {
console.log(record)
})
})
domObserver.observe(document.querySelector('#frame'), {childList: true, subtree: true})
// copy child nodes out of #template (as a string) and inject them into #frame for the observer to detect
document.querySelector('#frame').innerHTML = document.querySelector('#template').innerHTML
Run Code Online (Sandbox Code Playgroud)
<div id="frame"></div>
<div id="template" style="display: none;">
<div class="level-1">
<div class="level-2">
<div id="nested">
I exist in the DOM but am not being seen by …
Run Code Online (Sandbox Code Playgroud)