Back to Content

Firefox 41 release notes for developers

files/en-us/mozilla/firefox/releases/41/index.md

latest16.1 KB
Original Source

To test the latest developer features of Firefox, install Firefox Developer Edition Firefox 41 was released on September 22, 2015. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Changes for web developers

Developer Tools

Highlights:

All devtools bugs fixed between Firefox 40 and Firefox 41: note that many of these bugs, especially those relating to the performance tools, were uplifted to Firefox 40.

CSS

  • Support for laying out vertical scripts has been activated by default (Firefox bug 1138384). That means that the following CSS properties are now available:

    • Choosing the direction of writing: {{cssxref("writing-mode")}}.
    • Controlling orientation of characters: {{cssxref("text-orientation")}}.
    • Direction-independent equivalents of {{cssxref("width")}} and {{cssxref("height")}}: {{cssxref("block-size")}} and {{cssxref("inline-size")}}.
    • Direction-independent equivalents of {{cssxref("min-width")}} and {{cssxref("min-height")}}: {{cssxref("min-block-size")}} and {{cssxref("min-inline-size")}}.
    • Direction-independent equivalents of {{cssxref("max-width")}} and {{cssxref("max-height")}}: {{cssxref("max-block-size")}} and {{cssxref("max-block-size")}}.
    • Direction-independent equivalents of {{cssxref("margin-top")}}, {{cssxref("margin-right")}}, {{cssxref("margin-bottom")}} and {{cssxref("margin-left")}}: {{cssxref("margin-block-start")}}, {{cssxref("margin-block-end")}}, {{cssxref("margin-inline-start")}} and {{cssxref("margin-inline-end")}}.
    • Direction-independent equivalents of {{cssxref("padding-top")}}, {{cssxref("padding-right")}}, {{cssxref("padding-bottom")}} and {{cssxref("padding-left")}}: {{cssxref("padding-block-start")}}, {{cssxref("padding-block-end")}}, {{cssxref("padding-inline-start")}} and {{cssxref("padding-inline-end")}}.
    • Direction-independent equivalents of {{cssxref("border-top")}}, {{cssxref("border-right")}}, {{cssxref("border-bottom")}} and {{cssxref("border-left")}} and their longhands for width, style and color: {{cssxref("border-block-start")}}, {{cssxref("border-block-start-width")}}, {{cssxref("border-block-start-style")}}, {{cssxref("border-block-start-color")}}, {{cssxref("border-block-end")}}, {{cssxref("border-block-end-width")}}, {{cssxref("border-block-end-style")}}, {{cssxref("border-block-end-color")}}, {{cssxref("border-inline-start")}}, {{cssxref("border-inline-start-width")}}, {{cssxref("border-inline-start-style")}}, {{cssxref("border-inline-start-color")}}, {{cssxref("border-inline-end")}}, {{cssxref("border-inline-end-width")}}, {{cssxref("border-inline-end-style")}} and {{cssxref("border-inline-end-color")}}.
    • Direction-independent equivalents of {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("bottom")}} and {{cssxref("left")}}: offset-block-start, offset-block-end, offset-inline-start and offset-inline-end.
  • Support the {{cssxref("transform-origin")}} property in SVG and implement the {{cssxref("transform-box")}} property (Firefox bug 923193).

HTML

JavaScript

Interfaces/APIs/DOM

HTML Editing API

  • Cut, copy and paste commands handling has been revamped and now allow programmatic copying and cutting from JS for Web content:
    • With the 'paste' command as argument, {{domxref("Document.queryCommandSupported()")}} now returns false if has insufficient privileges to actually perform the action (Firefox bug 1161721).
    • With the 'cut' or 'copy' command as argument, {{domxref("Document.queryCommandSupported()")}} now returns true if called within the context of a user-initiated or privileged code (Firefox bug 1162952).
    • With the 'cut' or 'copy' command as argument, {{domxref("Document.execCommand()")}} now works, but only within the context of user-initiated or privileged code (Firefox bug 1012662).
    • Instead of raising an exception, {{domxref("Document.execCommand()")}} when the command is not supported or enabled (Firefox bug 1027560).

Events

  • The non-standard initCloseEvent() method of the {{domxref("CloseEvent")}} event and the ability to create a {{domxref("CloseEvent")}} using the {{domxref("Document/createEvent", "document.createEvent('CloseEvent')")}} method has been removed; use the standard constructor, {{domxref("CloseEvent.CloseEvent", "CloseEvent()")}} instead (Firefox bug 1161950).
  • On Desktop, {{domxref("PointerEvent")}} is now activated by default in Nightly; it is not activated in Developer Edition, Beta or Release and won't be for at least some versions (Firefox bug 1166347).
  • The unprefixed version of {{domxref("MouseEvent.movementX")}} and {{domxref("MouseEvent.movementY")}} have been added; the prefixed versions are deprecated and will be removed at some point in the future (Firefox bug 1164981).

Web Crypto

  • {{domxref("SubtleCrypto.importKey()")}} and {{domxref("SubtleCrypto.exportKey()")}} now supports ECDH keys (Firefox bug 1050175).

Canvas API

  • {{domxref("HTMLCanvasElement.captureStream()")}} and CanvasCaptureMediaStream have been added and allow to stream the display of a {{HTMLElement("canvas")}} in real-time (Firefox bug 1032848).
  • {{domxref("MediaStream.id")}} now returns the unique id of a stream (Firefox bug 1089798).
  • The initial value of {{domxref("CanvasRenderingContext2D.filter")}} is now correctly set to none (Firefox bug 1163124).

Service Workers

  • Improvement to our experimental Service Worker implementation:

    • {{domxref("ServiceWorkerGlobalScope.skipWaiting()")}} has been implemented (Firefox bug 1131352).
    • {{domxref("Clients.claim()")}} has been added (Firefox bug 1130684).
    • The other functional events of Service Workers have been made to inherit from {{domxref("ExtendableEvent")}}, giving them access to the {{domxref("ExtendableEvent.waitUntil","waitUntil()")}} method (Firefox bug 1160527).
  • The {{domxref("CacheStorage")}} and {{domxref("Cache")}} interfaces are now supported (Firefox bug 1110144).

WebGL

  • The failIfMajorPerformanceCaveat WebGL context attribute has been added and can be set when creating a WebGL context with {{domxref("HTMLCanvasElement.getContext()")}} to indicate if a context creation should fail if the system performance is low (Firefox bug 1164970).

WebRTC

  • Firefox no longer offers a default STUN server to be used if none are specified when constructing a new {{domxref("RTCPeerConnection")}}. You'll need to provide one in order to successfully establish a WebRTC connection.

Miscellaneous

MathML

New default and fallback font handling

Mathematical formulas require special fonts. So far, these fonts were hard-coded in the mathml.css user agent stylesheet (which sets the font-family on {{MathMLElement("math")}} tag) and in the preference option font.mathfont-family (which sets the fallback fonts to use for stretchy and large operators). Firefox 41 introduces an internal x-math language that is automatically set on the <math> tag as well as corresponding preference options (e.g., font.name.serif.x-math). The user agent stylesheet now sets font-family to serif on the <math> tag and the preference option font.mathfont-family is replaced with font.name.serif.x-math. All platforms now essentially use the same list of fallback fonts, with "Latin Modern Math" as the first one. The default/fallback fonts can be configured from the standard per-language font preference menu. For more details, see Firefox bug 947654 and Firefox bug 1160456.

SVG

Audio/Video

  • The media.autoplay.enabled preference now also applies to untrusted {{domxref("HTMLMediaElement.play()")}} invocations too, that is calls from non-users activated scripts (Firefox bug 659285).

Networking

Security

  • The CSP 1.1 manifest-src directive is now supported (Firefox bug 1089255).
  • Previous versions of Firefox incorrectly expected the Content Security Policy referrer directive's value origin-when-cross-origin to be spelled origin-when-crossorigin. This has been corrected to include the missing dash character.

Changes for add-on and Mozilla developers

XUL

No change.

JavaScript code modules

No change.

XPCOM

Interfaces

No change.

Other

  • A new, internal, and chrome-context-only API to render the root widget of a window into a {{HTMLElement("canvas")}} has been added: CanvasRenderingContext2D.drawWidgetAsOnScreen(). This API uses the operating system to snapshot the widget on-screen. For more details see Firefox bug 1167477.