mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Bug 1126633 - Use Array.prototype.some() instead of Array.prototype.includes() in promiseSetToolbarVisibility; r=mak
Array.prototype.includes() is disabled for all channels except Nightly so this patch switches the code in head.js to use some() instead.
This commit is contained in:
parent
adfc170313
commit
493c1655a1
@ -392,8 +392,9 @@ function promiseSetToolbarVisibility(aToolbar, aVisible, aCallback) {
|
||||
let transitionProperties =
|
||||
window.getComputedStyle(aToolbar).transitionProperty.split(", ");
|
||||
if (isToolbarVisible(aToolbar) != aVisible &&
|
||||
(transitionProperties.includes("max-height") ||
|
||||
transitionProperties.includes("all"))) {
|
||||
transitionProperties.some(
|
||||
prop => prop == "max-height" || prop == "all"
|
||||
)) {
|
||||
// Just because max-height is a transitionable property doesn't mean
|
||||
// a transition will be triggered, but it's more likely.
|
||||
aToolbar.addEventListener("transitionend", listener);
|
||||
|
Loading…
x
Reference in New Issue
Block a user