ExposureGuidelines
Always ask: Is this good for the web?
Adding or changing features
This process applies to all code contributions to Firefox that introduce, modify, or remove features that change how the web platform operates.
If you aim to expose a new feature to the web or change an existing feature, please follow these steps:
- Evaluate the new feature or change to an existing features.
- Email dev-platform declaring your intent to prototype. (It is okay to skip this step for small changes*.)
- Implement as normal. Code review rounds will take place, web-platform-tests will be written, etc.
- Email dev-platform declaring your intent to ship on Firefox Release.
- If there's no negative feedback, ship it!
*If you’re not sure, it’s unlikely to be a small change.
New features
There’s a lot of nuance that goes into adding a feature to the web. Mozilla sets a high bar for any changes we make to the web.
Making new features available requires some care and consideration.
Establish that the feature is important
We have finite resources and we want to ensure that we develop features that are important. Reasons might include:
- It’s of strategic importance to Mozilla.
- It contributes to Mozilla’s mission.
- This will make us the second/third browser to ship this, enabling more web developers to use it. That is, this helps with web compatibility and moves the web forward by having another independent implementation.
Ensure that the feature is standardized
Mozilla is committed to standardization as the basis for evolving the Web. We want to ensure that features are good for our users and have broad support from other browsers, web developers, and the broader community. The standards process is how we ensure that features meet these expectations.
Our goal is that all new web-facing features are based on a specification that is the product of a recognized standards body.
Standardization requirements for prototypes
If a specification for a feature is not the product of a standards body, your intent to prototype needs to identify what steps have been taken to ensure that it will be. You should identify which standards body you believe should take the work on. Include a link to a record from that standards body that tracks the feature becoming an official product.
What you minimally need to show might differ according to the processes of the standards body:
- W3C - an issue raised on a working group charter (not a community group)
- WHATWG - an issue raised on the appropriate standard(s)
- IETF - an explicit request for adoption by a working group
- TC39 - a link to a proposal at stage 1 or higher
- For other bodies, a request for consideration according to the procedures of the body
Being able to prototype new features allows us to learn about them, but experimentation serves to inform our choices in standards bodies. Features that have not been discussed within the processes of a standards body will require extra scrutiny to ensure that it is safe to prototype. This applies especially to W3C work that is not the product of a working group or community group; the same applies to individual submissions to the IETF.
Standardization requirements for shipping features
An intent to ship must include an update on the standardization status of the feature. We expect that shipping features will be further advanced in the standards process when they ship.
Your intent to ship should include information that shows not only that the standards body has adopted the work, but also that there is consensus that the feature is ready to be shipped. What evidence is necessary will vary, but generally this will be:
- W3C - the specification is at the Candidate Recommendation maturity level or more advanced; shipping from a Working Draft or a less advanced specification requires evidence of agreement within the working group that shipping is acceptable
- WHATWG - the changes have been merged into a standard; an open pull request requires additional evidence of agreement among implementers that shipping is acceptable
- IETF - a working group draft that has been passed to the IESG for publication by the working group; a draft working group in an earlier state should show evidence that shipping is acceptable to the working group
- TC39 - the proposal is at stage 3 or higher
- The product of other bodies will be assessed individually
In all of these cases, try to show that there are no significant unresolved issues with a specification and that there are no objections to shipping it. Simply showing that there is support for a feature is less useful.
Shipping features that don’t meet these requirements is still possible, including features that don't show broad agreement that shipping is acceptable. If your feature needs an exception to this rule, please reach out to Firefox Technical Leadership. Any intent regarding a non-standard feature might need to include additional safeguards such as experimentation and data collection plans, risk assessments, and rollback strategies.
Ensure that Mozilla has a position on the feature
standards-positions is where Mozilla formalizes positions on new features. Open an issue there if one does not already exist.
Changing or evolving features
When making changes to existing features or even removing existing features many of the considerations stated for evaluating new features apply, but one thing that is quite different is that telemetry might be important here as in general Mozilla is pretty averse to shipping breaking changes. Coordination with the relevant standard and other browsers is usually the way to go.
Email templates for new or changed features
When announcing your intent to prototype or ship a feature, using these templates ensures that you don’t miss anything critical.
Intent to prototype
To: dev-platform@mozilla.org
Subject: Intent to prototype: <your feature goes here>Summary: elevator pitch for the new functionality including benefits to users and web developers.
Bug: link to Bugzilla (tracking) bug.
Specification: link to the specification (see details above)
Standards Body: identify the standards body responsible for standardizing this feature if that is not obvious from the specification; if the specification is not already adopted by a standards body, link to the issue or a discussion about adoption of the work (if no discussion exists, please start that process before filing this intent)
Platform coverage: where will this be available? Android, Desktop, only exposed to privileged apps (certified app-only functionality does not require an email), etc.
Preference: if applicable, how can interested parties test this before it ships pref'd on by default?
DevTools bug: link to a Developer Tools bug coordinating work with the DevTools team to build tools for this feature.
Link to standards-positions discussion: Link to an issue in mozilla/standards-positions about what we think about the specification.
Other browsers:
- Blink: address with "shipped" (since version X, behind what flags if any), "intent emailed" (mailing list URL), or "considering" (citation).
- WebKit: address with "shipped" (since version X, behind what flags if any), "intent emailed" (mailing list URL), or "considering" (citation).
web-platform-tests: Please link to the test suite. If any part of the feature is not tested by web-platform-tests, or if you had to write gecko-only tests for parts of the feature, please include links to one or more of:
Suggested additions
The above is the minimum required that should be in an "Intent to prototype" email. If you've covered those, you're good, and brevity is a virtue.
If you're looking for extra credit, or to preempt common questions, consider adding any or all of the following (all based on existing dev-platform examples, and questions asked on dev-platform in response to intent to ship emails).
- How stable is the spec: Note that even if it's unstable that shouldn't stop us implementing; that mostly affects shipping. So as long as we're pretty sure that the basic set of functionality is stable, even if the actual names of the values are not, implementing makes sense.
- +1 Tantek (tantek.com) 14:21, 12 August 2022 (UTC)
- ... add yourself
- Security & Privacy Concerns: consider providing a link to answers in this security/privacy questionnaire for a spec feature, if the spec doesn't already answer it. In particular, consider if the spec exposes new information about a user's computer or behavior that can contribute to fingerprinting.
- +1 Tantek (tantek.com) 14:21, 12 August 2022 (UTC)
- ... add yourself
- Web designer / developer use-cases AKA Why a developer would use Feature X?: Provide a URL to at least briefly documented use-cases for web designers and developers that illustrate why and when they would use this feature. E.g. a link to an https://webwewant.fyi/wants/ entry with that information.
- +1 Tantek (tantek.com) 14:21, 12 August 2022 (UTC)
- ... add yourself
- Example: Provide a brief code sample on how to use the API. Even with a formal specification, not everyone will know about the feature just from the name of the spec. An example will make it easier to understand how this feature can be used. This can either be an inline code sample, or a direct link to an example on the web.
- +1 Tantek (tantek.com) 14:21, 12 August 2022 (UTC)
- ... add yourself
Intent to ship
To: dev-platform@mozilla.org
Subject: Intent to ship: <your feature goes here>As of <target date> I intend to turn <feature> on by default [<on these platforms>]. It has been developed behind the <pref> preference. Status in other browsers is <details>.
Bug to turn on by default: link to main relevant bug (https://bugzilla.mozilla.org/show_bug.cgi?id=) Please set the dev-doc-needed keyword.
Standard: link to the standard; if the work is not yet part of a standard, also provide evidence that the responsible standards body has agreement that shipping the feature has broad support (see details above)
This feature was previously discussed in this "Intent to prototype" thread: <https://groups.google.com/a/mozilla.org/g/dev-platform>. If anything changed since that thread please include that information in this email.
It's acceptable to merge the "intent to prototype" into the "intent to ship" email as long as all the relevant requirements are met.
Suggested additions
- TAG Review: link to TAG review of the feature/spec. Note: Blink requires this in their intent process.
- +1 User:Zcorpan (proposed)
- +1 User:Tantek
- ... add yourself
Removing features
All removals require special care. In particular, most removals have a significant web compatibility risk that needs to be carefully assessed.
If you aim to remove a feature from the web, please follow these steps:
- Evaluate the removal.
- Consult dev-platform with an intent to unship that includes any relevant data.
- Indicate in the developer console whenever the feature is used that it's deprecated and might be removed. It's best to avoid doing this until there's agreement that the feature can be removed (which requires telemetry) as otherwise developers are needlessly spammed in the console.
- Unship the feature when all is in order.
Intent to unship
To: dev-platform@mozilla.org
Subject: Intent to unship: <your feature goes here>As of <target date> I intend to remove <feature> [<on these platforms>]. Status in other browsers is <details>.
Bug to remove: link to main relevant bug (https://bugzilla.mozilla.org/show_bug.cgi?id=) Please set the dev-doc-needed keyword.
<Include rationale, telemetry analysis, links to related discussions if any, and developer console suggestions.>
See Also
- WebAPI/WebIDL_Review_Checklist
- Chrome/Blink change process
- Intent To Ship bot: Mastodon Twitter Source code
FAQ
How do we know what web developers want?
There's no good way to determine this currently, but feedback on GitHub, StackOverflow, workarounds in JavaScript libraries, MDN surveys, as well as use cases brought up during standardization help paint a picture.
How do we know what other browser engines think?
- Most of the time this should fall out of the standardization process (e.g., discussion in a GitHub repository)
- Watch for "intent to *" emails on mailing lists such as blink-dev
- By asking!
- WebKit (Apple) can be asked on their standards-positions repo
- Chrome: Positions from Google Chrome Teams on Web Standards
How do we let other browser engines know what we think?
- By documenting our position on standards-positions.
- Participating in public discussions of new features.
- Comment on "Intent to *" threads on blink-dev. (Ideally this is not necessary, but it's a good last resort option.)
What about prefixes?
In the past, Mozilla has shipped experimental features with a "moz" prefix to indicate their lack of standardization (e.g., mozRequestAnimationFrame()
). Unfortunately, this approach turned out to be harmful to the web as experimental features ended up being used in some websites before they were ready. In many cases, this meant that we were unable to innovate on certain features because to change them would break content on the web. Browsers have in some cases also been forced to implement each other's prefixed features. Therefore, to allow us to continue innovating without negatively affecting content on the web, Mozilla will no longer ship new "moz"-prefixed features (see Henri Sivonen's proposal).
Who decides?
If the dev-platform thread results in a conflict, the respective module owner is responsible for resolving that conflict and making a decision on how to proceed.