Open rogerxu opened 2 years ago
New in Chrome 70 | Web | Google Developers
workers
In Chrome 70, workers now have a name
attribute, which is specified by an optional argument on the constructor.
const url = '/scripts/my-worker.js';
const wNYC = new Worker(url, {name: 'NewYork'});
const oSF = {name: 'SanFrancisco'};
const wSF = new Worker(url, oSF);
What's New In DevTools (Chrome 70) | Web | Google Developers
New in Chrome 71 | Web | Google Developers
Intl.RelativeTimeFormat()
const rtf = new Intl.RelativeTimeFormat('en');
rtf.format(3.14, 'second');
// → 'in 3.14 seconds'
rtf.format(-15, 'minute');
// → '15 minutes ago'
.left {
text-underline-position: left;
}
.right {
text-underline-position: right;
}
What's New In DevTools (Chrome 71) | Web | Google Developers
New in Chrome 72 | Web | Google Developers
class Counter {
_value = 0;
get value() {
return this._value;
}
increment() {
this._value++;
}
}
const counter = new Counter();
console.log(counter.value);
// → 0
counter.increment();
console.log(counter.value);
// → 1
Intl.format
const lf = new Intl.ListFormat('en');
lf.format(['Frank']);
// → 'Frank'
lf.format(['Frank', 'Christine']);
// → 'Frank and Christine'
lf.format(['Frank', 'Christine', 'Flora']);
// → 'Frank, Christine, and Flora'
lf.format(['Frank', 'Christine', 'Flora', 'Harrison']);
// → 'Frank, Christine, Flora, and Harrison'
const lf = new Intl.ListFormat('en', { type: 'disjunction' });
lf.format(['Frank']);
// → 'Frank'
lf.format(['Frank', 'Christine']);
// → 'Frank or Christine'
lf.format(['Frank', 'Christine', 'Flora']);
// → 'Frank, Christine, or Flora'
lf.format(['Frank', 'Christine', 'Flora', 'Harrison']);
// → 'Frank, Christine, Flora, or Harrison'
What's New In DevTools (Chrome 72) | Web | Google Developers
including a new audit that detects JS libraries and new keywords for accessing the Audits panel from the Command Menu.
New in Chrome 73 | Web | Google Developers
Signed HTTP Exchanges (SGX), part of an emerging technology called Web Packages is now available in Chrome 73. A Signed HTTP Exchange makes it possible to create “portable” content that can be delivered by other parties, and this is the key aspect, it retains the integrity and attribution of the original site.
Constructable Stylesheets make it possible to define and prepare shared CSS styles, and then apply those styles to multiple Shadow Roots or the Document easily and without duplication.
What's New In DevTools (Chrome 73) | Web | Google Developers
Use Logpoints to log messages to the Console without cluttering up your code with console.log()
calls.
When inspecting a node, DevTools now shows an expanded tooltip containing commonly important information like font size, font color, contrast ratio, and box model dimensions.
Pressing Shift+Tab
focuses the last message (or result of an evaluated expression). If the message contains links, the last link is highlighted first. Pressing Enter
opens the link in a new tab. Pressing the Left
arrow key highlights the entire message.
Pressing the Right
arrow key expands a collapsed stack trace (or object, array, and so on).
The Sensors tab now lets you save custom geolocation overrides.
The Sources and Network panels now support code folding.
Settings > Preferences > Sources enable Code folding.
New in Chrome 74 | Web | Google Developers
class IncreasingCounter {
// Private class field
#privateValue = 0;
get value() {
return this.#privateValue;
}
increment() {
this.#privateValue++;
}
}
prefers-reduced-motion
@media (prefers-reduced-motion: reduce)
transition
eventstransitionrun
transitionstart
transitionend
transitioncancel
What's New In DevTools (Chrome 74) | Web | Google Developers
Hover over a CSS property that affects a node's box model, such as padding
or margin
, to highlight all nodes affected by that declaration.
Command Menu > Capture area screenshots. Drag your mouse over the section of the viewport that you want to screenshot.
Type is:service-worker-initiated
or is:service-worker-intercepted
in the Network panel filter text box to view requests that were caused (initiated
) or potentially modified (intercepted
) by a service worker.
The Timings section of a Performance recording now marks First Paint.
New in Chrome 75 | Web | Google Developers
canvas
contextsAdd desynchronized: true
to the options object when creating the canvas.
Use navigator.canShare
to check if file sharing is supported.
Numeric literals now allow underscores (_
, U+005F) as separators to make them more readable. For example, 1_000_000_000
will be interpreted by mathematical operations as equivalent to 1000000000
.
What's New In DevTools (Chrome 75) | Web | Google Developers
The new autocomplete behavior. DevTools is autocompleting to filter: blur(1px)
and the change is visible in the viewport.
Hovering over the Size column to view a resource's uncompressed size.
You can now disable these detailed tooltips from Settings > Preferences > Elements > Show Detailed Inspect Tooltip.
To override the default behavior and use Tab to move focus, enable Settings > Preferences > Sources > Enable Tab Moves Focus.
New in Chrome 76 | Web | Google Developers
If your site meets the Progressive Web App installability criteria, Chrome will show an install button in the omnibox indicating to the user that your PWA can be installed. If the user clicks the install button, it’s essentially the same as calling prompt()
on the beforeinstallprompt
event; it shows the install dialog, making it easy for the user to install your PWA.
On mobile, Chrome shows the mini-infobar the first time a user visits your site if it meets the Progressive Web App installability criteria.
Starting in Chrome 76, calling preventDefault()
on the beforeinstallprompt
event will stop the mini-infobar from appearing.
When a Progressive Web App is installed on Android, Chrome automatically requests and installs a Web APK. After it’s been installed, Chrome periodically checks if the web app manifest has changed.
Starting in Chrome 76, Chrome will check the manifest more frequently; checking every day, instead of every three days.
The prefers-color-scheme
media query, allows you to adjust the look and feel of your site to match the user's preferred mode.
Promise.allSettled()
Promise.allSettled()
is similar to Promise.all()
, except it waits until all of the promises are settled before returning.
Blobs are easier to read with three new methods: text()
, arrayBuffer()
, and stream()
; this means we don’t have to create a wrapper around file reader any more!
Support for images to the Asynchronous Clipboard API, making it easy to programmatically copy and paste images.
Image Support for the Async Clipboard API | Web | Google Developers
What's New In DevTools (Chrome 76) | Web | Google Developers
The Style pane's autocomplete UI now supports CSS values.
The _webSocketMessages
property begins with an underscore to indicate that it's a custom field.
...
"_webSocketMessages": [
{
"type": "send",
"time": 1558730482.5071473,
"opcode": 1,
"data": "Hello, WebSockets!"
},
{
"type": "receive",
"time": 1558730482.5883863,
"opcode": 1,
"data": "Hello, WebSockets!"
}
]
...
Use the new Background Services section of the Application panel to monitor Background Fetch and Background Sync events.
New in Chrome 77 | Web | Google Developers
The Largest Contentful Paint API, available starting in Chrome 77, reports the render time of the largest content element visible in the viewport and makes it possible to measure when the main content of the page is loaded.
formdata
eventThe formdata
event is a low-level API that lets any JavaScript code participate in a form submission.
const form = document.querySelector('form');
form.addEventListener('formdata', ({formData}) => {
formData.append('my-input', myInputValue);
});
Form-associated custom elements help to bridge the gap between custom elements and native controls. Adding a static formAssociated
property tells the browser to treat the custom element like all other form elements.
To tell the browser you want an image, or iframe lazy loaded, use the loading=”lazy”
attribute. Images and iframes that are “above the fold” load normally. And those that are below, are only fetched when the user scrolls near them.
<img src="image.jpg" loading="lazy" width="400" height="250" alt="...">
What's New In DevTools (Chrome 77) | Web | Google Developers
DevTools can now help you detect layout shifting:
Rendering
.The Size column of the Network panel now says (prefetch cache
) when a resource was loaded from the prefetch cache.
The Console now shows private class fields in its object previews.
The Background Services section of the Application panel now supports Push Messages and Notifications.
New in Chrome 78 | Web | Google Developers
html {
--my-color: url(‘not-a-color’); // Oops, not a color!
}
.thing {
color: var(--my-color);
}
Registering a property is as easy as calling window.CSS.registerProperty()
and providing the name of the property you’re defining the type of property it is, if it should inherit, and it’s initial value.
window.CSS.registerProperty({
name: '--my-color',
syntax: '<color>',
inherits: false,
initialValue: 'black',
});
Byte-for-byte checks are now performed for service worker scripts imported by importScripts()
.
Origin trials provide an opportunity for us to validate experimental features and APIs, and make it possible for you to provide feedback on their usability and effectiveness in broader deployment.
Opting into an origin trial allows you to build demos and prototypes that your beta testing users can try for the duration of the trial without requiring them to flip any special flags in Chrome.
What's New In DevTools (Chrome 78) | Web | Google Developers
You can now use the Audits panel in combination with other DevTools features like Request Blocking and Local Overrides.
The Background Services section of the Application panel now supports Payment Handler events.
New in Chrome 79 | Web | Google Developers
Installed Progressive Web Apps on Android now support maskable icons.
You can now create immersive experiences with the WebXR Device API.
To request a wake lock, you need to call navigator.wakeLock.request()
, and save the WakeLockSentinel
object that it returns.
rendersubtree
attributeThere are times when you don’t want part of the DOM to render immediately. For example scrollers with a large amount of content, or tabbed UIs where only some of the content is visible at any given time.
The new rendersubtree
attribute tells the browser it can skip rendering that subtree. This allows the browser to spend more time processing the rest of the page, increasing performance.
What's New In DevTools (Chrome 79) | Web | Google Developers
After recording network activity, select a network resource and then navigate to the updated Cookies tab to understand why that resource's request or response cookies were blocked.
prefers-color-scheme
and prefers-reduced-motion
preferencesThe prefers-color-scheme
media query lets you match your site's style to your user's preferences.
The Sensors tab now lets you not only override geolocation, but also emulate arbitrary timezones and test the impact on your web apps. Perhaps surprisingly, this new feature improves the reliability of geolocation emulation as well: previously, web apps could detect location spoofing by matching the location against the user's local timezone. Now that geolocation and timezone emulation are coupled, this category of mismatches is eliminated.
The Coverage tab now uses new colors to represent used and unused code.
After recording network activity, select a network resource and then navigate to the Initiator tab to understand why the resource was requested. The Request call stack section describes the JavaScript call stack leading up to the network request.
Go to Settings > Preferences > Sources > Default Indentation to set your preference.
Press Ctrl+P in the Console or Sources panels to move your cursor to the line above. Press Ctrl+N to move your cursor to the line below.
Google Chrome version history - Wikipedia