30
Firefox 65 for developers
source link: https://www.tuicool.com/articles/hit/IvYbyaI
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This article provides information about the changes in Firefox 65 that will affect developers. Firefox 65 is the current Beta version of Firefox , and will ship onJanuary 29, 2019.
Changes for web developers
Developer tools
- TheFlexbox inspector is now enabled by default.
- Support has been added to theJavaScript Debugger for XHR Breakpoints (bug 821610).
- Right-click on an item in the accessibility tree from the Accessibility viewer toprint it as json to the JSON viewer.
- Thecolor contrast display of the Accessibility Picker has been updated so that if a text's background is complex (e.g. a gradient or complex image), it shows a range of color contrast values.
- The Headers tab of theNetwork Monitor now displays the Referrer Policy for the selected request (bug 1496742).
- When displaying stack traces (e.g. in console logs or the JavaScript debugger), calls to framework methods are identified and collapsed by default, making it easier to home in on your code.
- In the same fashion as native terminals, you can now use reverse search to find entries in your JavaScript console history ( F9 on Windows/Linux or Ctrl + R on macOS, then type a search term, followed by Ctrl + R / Ctrl + S to toggle through results).
-
The JavaScript console's
$0
shortcut (references the currently inspected element on the page) now has autocomplete available, so for example you could type$0.te
to get autocomplete suggestions for properties like$0.textContent
. - The edits you make in the Rules view of the Inspector are now listed in the Changes panel (bug 1503920).
HTML
-
Events are now dispatched on disabled HTML elements, i.e.
<button>
,<fieldset>
,<input>
,<select>
, and<textarea>
elements withdisabled
attributes set on them (bug 329509). -
Removing the
src
attribute of an<iframe>
element now causesabout:blank
to be loaded into it, giving it parity with Chrome and Safari (bug 1507842). Previously removingsrc
had no effect on theiframe
content. -
We have added support for the
referrerpolicy
attribute on<script>
elements (bug 1460920).
CSS
-
The
image-rendering
property'scrisp-edges
value has now been unprefixed (bug 1496617). -
A
scrollbar-color
value ofauto
now resolves toauto
, rather than two colors (bug 1501418). -
The
break-*
properties have been implemented, and the legacypage-break-*
properties have been aliased to them (bug 775618):-
break-before
is now an alias forpage-break-before
. -
break-after
is now an alias forpage-break-after
. -
break-inside
is now an alias forpage-break-inside
.
-
-
The
overflow-wrap
property'sanywhere
value has been implemented (bug 1505786). -
The new step position keywords
jump-start
,jump-end
,jump-none
, andjump-both
— usable inside thesteps()
timing function — have been implemented (bug 1496619). This also coincides with the removal of theframes()
timing function, which was the previous way of implementing such functionality, now deprecated. -
Some new
-webkit-appearance
values have been added, for compatibility with other browsers. In particular:-
meter
, which is now used as the default value for<meter>
elements in UA stylesheets. the existing valuemeterbar
is now an alias formeter
( bug 1501483 ). -
progress-bar
, which is now used as the default value for<progress>
elements in UA stylesheets. the existing valueprogressbar
is now an alias forprogress-bar
( bug 1501506 ). -
textarea
, which is now used as the default value for<textarea>
elements in UA stylesheets. the existing valuetextfield-multiline
is now an alias fortextarea
( bug 1507905 )
-
-
The behavior of
user-select
has been changed to make it align more with other browsers (bug 1506547). Specifically:-
user-select: all
set on an element no longer overrides other values ofuser-select
set on children of that element. So for example in the following snippet:<div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div> </div>
The<div>
withnone
set on it is now non-selectable. Previously this value would have been overriden by theall
value set on the parent element. -
non-
contenteditable
elements nested insidecontenteditable
elements are now selectable. -
user-select
now behaves consistently inside and outside shadow DOM. -
The proprietary
-moz-text
value has been removed.
-
-
CSS environment variables (the
env()
function) have been implemented (bug 1462233).
Removals
-
The
layout.css.shape-outside.enabled
pref has been removed;shape-outside
,shape-margin
, andshape-image-threshold
can no longer be disabled inabout:config
( bug 1504387 ). -
Several Firefox-only values of the
user-select
property have been removed —-moz-all
,-moz-text
,tri-state
,element
,elements
, andtoggle
. Seebug 1492958 andbug 1506547. -
As mentioned above, the
frames()
timing function has been removed (bug 1496619).
SVG
No changes.
JavaScript
-
Intl.RelativeTimeFormat
is now supported (bug 1504334). -
Strings now have a maximumlength of
2**30 - 2
(~1GB) instead of2**28 - 1
(~256MB) (bug 1509542). -
globalThis
has been implemented (bug 1317422).
APIs
New APIs
- Readable Streams have been enabled by default (bug 1505122).
- TheStorage Access API has been enabled by default (bug 1513021).
DOM
-
Performance.toJSON()
has been exposed toWeb Workers ( bug 1504958 ). -
XMLHttpRequest
requests will now throw aNetworkError
if the requested content type is aBlob
, and the request method is notGET
( bug 1502599 ). -
The
-moz-
prefixed versions of many of theFullscreen API features have been deprecated, and will now display deprecation warnings in the JavaScript console when encountered (bug 1504946). -
createImageBitmap()
now supports SVG images (SVGImageElement
) as an image source (bug 1500768). -
You can now use the
HTMLImageElement.decode()
andSVGImageElement.decode()
methods to asynchronously decode the image data for HTML and SVG images, respectively. Each returns a promise which resolves once the image data is decoded and ready for use.
DOM events
-
Going forward, only one
Window.open()
call is allowed per event (bug 675574).
Web workers
-
SharedWorkerGlobalScope.onconnect
's event object is aMessageEvent
instance — itsdata
property is now an empty string value rather thannull
( bug 1508824 ).
Fetch and Service workers
-
The
Response.redirect()
method now correctly throws aTypeError
if a non-valid URL is specified as the first parameter (bug 1503276). -
The
ServiceWorkerContainer.register()
andWorkerGlobalScope.importScripts()
(when used by a service worker) methods will now accept any files with a validJavaScript MIME type ( bug 1354577 ). -
The
FetchEvent.replacesClientId
andFetchEvent.resultingClientId
properties are now supported (bug 1264177). -
The
ServiceWorkerGlobalScope.onmessageerror
andServiceWorkerContainer.onmessageerror
handler properties have been implemented (bug 1399446). -
The
Origin
header is no longer set on Fetch requests with a method ofHEAD
orGET
( bug 1508661 ).
Media, Web Audio, and WebRTC
-
TheWebRTC
RTCIceCandidateStats
dictionary has been updated according to the latest spec changes (bug 1324788,bug 1489040; see also
RTCIceCandidateStats has been updated to the latest spec for more details on exactly what has changed). -
The
MediaRecorder
pause
andresume
events (and their corresponding event handler properties —MediaRecorder.onpause
andMediaRecorder.onresume
) were not previously implemented, even though compatibility tables claimed they had been. They have now been implemented (bug 1458538, bug 1514016 ).
Canvas and WebGL
Removals
- Mutation events have been disabled in shadow trees (bug 1489858).
-
The non-standard
MediaStream
propertycurrentTime
has been removed (bug 1502927). -
The
dom.webcomponents.shadowdom.enabled
anddom.webcomponents.customelements.enabled
prefs have been removed — Shadow DOM and Custom Elements can no longer be disabled inabout:config
( bug 1503019 ). -
The non-standard DOM
text
event — fired to notify the browser editor UI of IME composition string data and selection range — has been removed (bug 1288640).
Security
- Additional CORS restrictions are now being enforced on allowable request headers (bug 1483815, see also whatwg fetch issue 382: CORS-safelisted request headers should be restricted according to RFC 7231 for more details).
Networking
- WebSockets have been implemented over HTTP/2 (bug 1434137).
Plugins
No changes.
Other
-
Support forWebP images has been added (bug 1294490).
-
In addition, to faciliate cross-browser compatibility in certain situations the WebP MIMEType (
image/webp
) has been added to the standard HTTP RequestAccept
header for HTML files (bug 1507691).
-
In addition, to faciliate cross-browser compatibility in certain situations the WebP MIMEType (
Changes for add-on developers
API changes
Menus
Tabs
-
The
tabs API
has been enhanced to support tab successors — a tab can have a successor assigned to it, which is the ID of the tab that will be active once it is closed (bug 1500479, also see this blog post
for more information). In particular:
-
The
tabs.Tab
type now has asuccessorId
property, which can be used to store/retrieve the ID of the tab's successor. -
The
tabs.onActivated
event listener's callback has a new parameter available,previousTabId
, which contains the ID of the previous activated tab, if it is still open. -
The
tabs.update()
function'supdateProperties
object has a new optional property available on it, cansuccessorTabId
, so can be used to update it. -
successorTabId
is also returned by functions liketabs.get()
andtabs.query()
. -
Two new functions are available,
tabs.moveInSuccession()
andtabs.moveInSuccessionAfter()
, which allow manipulation of tab successors in bulk.
-
The
Manifest changes
No changes.
Other
-
The
headerURL
/theme_frame
properties forWebextension themes are now supported on Firefox for Android (bug 1429488).
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK