({
photo: foo.addEventListener("animationend", photoCycle, true) || foo.addEventListener("webkitAnimationEnd", photoCycle, true),
bio: foo.addEventListener("animationend", bioCycle, true) || foo.addEventListener("webkitAnimationEnd", bioCycle, true)
})[mode]
モードを評価するオブジェクトを作成しようとしています(これは文字列photoまたはになります)、それが firefoxまたは chromebioであるかどうかに応じてイベントリスナーを追加します。奇妙なことに、モードがキーの無効なラベルの構文エラーになります。animationendwebkitanimationendphotobio