There are a bunch of Firefox-specific extensions to JEXL that one can use in targeting expressions, including `preferenceValue`, `regexpMatch`, and others that are very hard to discover. The list is here: https://searchfox.org/mozilla-central/source/toolkit/components/utils/FilterExpressions.sys.mjs#22-35 I'd suggest we document them (or link to a doc about them) from the top of https://firefox-source-docs.mozilla.org/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.html#available-attributes, as I suspect that at least preferenceValue is likely to come in handy helping someone run an experiment without requiring a train ride...
Bug 1825107 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
There are a bunch of Firefox-specific extensions to JEXL that one can use in targeting expressions, including `preferenceValue`, `regexpMatch`, and others that are very hard to discover. The list is here: https://searchfox.org/mozilla-central/source/toolkit/components/utils/FilterExpressions.sys.mjs#22-35 I'd suggest we document them (or link to a doc about them) from the top of https://firefox-source-docs.mozilla.org/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.html#available-attributes, as I suspect at least `preferenceValue` is likely to come in handy helping someone run an experiment without having to wait for a train ride... As part of this documentation, for `preferenceValue` in particular, we may want to write up the tradeoffs of using it vs exposing preferences as explicit targeting attributes (the latter exposes it to ASRouter devtools, which makes it more discoverable and gives it a more convenient way to reference).
There are a bunch of Firefox-specific extensions to JEXL that one can use in targeting expressions, including `preferenceValue`, `regexpMatch`, and others that are very hard to discover. The list is here: https://searchfox.org/mozilla-central/rev/907db2c22743f1b24496198b10a3dca4085cfb08/toolkit/components/utils/FilterExpressions.sys.mjs#39-52 I'd suggest we document them (or link to a doc about them) from the top of https://firefox-source-docs.mozilla.org/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.html#available-attributes, as I suspect at least `preferenceValue` is likely to come in handy helping someone run an experiment without having to wait for a train ride... As part of this documentation, for `preferenceValue` in particular, we may want to write up the tradeoffs of using it vs exposing preferences as explicit targeting attributes (the latter exposes it to ASRouter devtools, which makes it more discoverable and gives it a more convenient way to reference).