Open rogerxu opened 2 years ago
New in Chrome 62 | Web | Google Developers What's New In DevTools (Chrome 62) | Web | Google Developers
navigator.connection.effectiveType
> 3g
.heading {
font-family: "Avenir Next Variable";
font-size: 48px;
font-variation-settings: 'wght' 700, 'wdth' 75;
}
.content {
font-family: "Avenir Next Variable";
font-size: 24px;
font-variation-settings: 'wght' 400;
}
await
in the ConsoleCtrl
and select the region of the viewport.-<text>
to filter out any message that includes <text>
.
url:<text>
New in Chrome 63 | Web | Google Developers What's New In DevTools (Chrome 63) | Web | Google Developers
button.addEventListener('click', event => {
import('./dialogBox.js')
.then(dialogBox => {
dialogBox.open();
})
.catch(error => {
/* Error handling */
});
});
async function* getChunkSizes(url) {
const response = await fetch(url);
const b = response.body;
for await (const chunk of magic(b)) {
yield chunk.length;
}
}
.messages {
overscroll-behavior: contain;
}
Promise.prototype.finally
Promise.prototype.finally | Web | Google Developers
const fetchAndDisplay = ({ url, element }) => {
showLoadingSpinner();
fetch(url)
.then((response) => response.text())
.then((text) => {
element.textContent = text;
})
.catch((error) => {
element.textContent = error.message;
})
.finally(() => {
hideLoadingSpinner();
});
};
Using async/await
const fetchAndDisplay = async ({ url, element }) => {
showLoadingSpinner();
try {
const response = await fetch(url);
const text = await response.text();
element.textContent = text;
} catch (error) {
element.textContent = error.message;
} finally {
hideLoadingSpinner();
}
};
const pr = new Intl.PluralRules('en-US');
pr.select(0); // 0 puppies
pr.select(1); // 0 puppy
pr.select(2); // 2 puppies
New in Chrome 64 | Web | Google Developers
What's New In DevTools (Chrome 64) | Web | Google Developers
ResizeObserver
It is like document.onresize
for elements.
Block pop-up which navigates the page.
import.meta
It exposes the URL for the module as import.meta.url
.
window.alert()
No longer brings a background tab to the foreground.
New in Chrome 65 | Web | Google Developers What's New In DevTools (Chrome 65) | Web | Google Developers
The CSS Paint API allows you to grammatically generate an image for CSS properties like background-image
or border-image
.
The new Server Timing API allows your server to pass timing information to the browser; giving you a better picture of your overall performance by adding a Server-Timing
header to your response:
'Server-Timing': 'su=42;"Start-up",db-read=142;"Database Read"'
display: contents
Adding display: contents
to the outer div, makes the outer div disappear and its constraints are no longer applied to the inner div. The inner div is now 100% width.
Override network requests and serve local resources on your filesystem instead.
Track changes that you make locally in DevTools via the new Changes tab.
Use the Accessibility pane on the Elements panel to investigate the accessibility properties of the currently-selected element.
New in Chrome 66 | Web | Google Developers
What's New In DevTools (Chrome 66) | Web | Google Developers
el.attributeStyleMap.set('opacity', 0.3);
const oType = el.attributeStyleMap.get('opacity').value; // 0.3
It also helps to eliminate bugs caused by forgetting to cast the value from a string to a number, and it automatically handles rounding and clamping of values.
el.style.opacity = 3;
const opacity = el.computedStyleMap().get('opacity').value;
console.log(opacity);
> 1
navigator.clipboard.writeText('Copy me!')
.then(() => {
console.log('Text is on the clipboard.');
});
navigator.clipboard.getText()
.then((text) => {
console.log('Clipboard: ', text);
});
BitmapRenderer
const image = await createImageBitmap(imageBlob);
const context = el.getContext('bitmaprenderer');
context.transferFromImageBitmap(image);
autocomplete
attribute in TextArea
and Select
autocapitalize
attribute on for
trimStart()
and trimEnd()
for stringsThe Initiator column in the Network panel tells you why a resource was requested. After blackboxing a script, it hides any calls from the script that you blackboxed.
The Preview tab in the Network panel now pretty-prints resources by default when it detects that those resources have been minified.
New in Chrome 67 | Web | Google Developers
const sensor = new Gyroscope({frequency: 500});
sensor.start();
sensor.onreading = () => {
console.log("X-axis " + sensor.x);
console.log("Y-axis " + sensor.y);
console.log("Z-axis " + sensor.z);
};
BigInt
let max = BigInt(Number.MAX_SAFE_INTEGER);
// → 9_007_199_254_740_991n
max = max + 9n;
// → 9_007_199_254_741_000n - Yay!
What's New In DevTools (Chrome 67) | Web | Google Developers
Select Copy > Copy As Fetch to copy the fetch()
-equivalent code.
New in Chrome 68 | Web | Google Developers
What's New In DevTools (Chrome 68) | Web | Google Developers
New in Chrome 69 | Web | Google Developers
#gallery {
scroll-snap-type: x mandatory;
overflow-x: scroll;
display: flex;
}
#gallery img {
scroll-snap-align: center;
}
<meta name='viewport' content='initial-scale=1, viewport-fit=cover'>
navigator.locks.request('network_sync_lock', async lock => {
// The lock has been acquired.
await do_something();
await do_something_else();
// Now the lock will be released.
});
Google Chrome version history - Wikipedia