[JavaScript]ブラウザバック判定

isBrowserBack(){
    const perfEntries = performance.getEntriesByType("navigation");
    let result = false;
    perfEntries.forEach((perfEntry) => {
        if(perfEntry.type == 'back_forward'){
            result = true;
        }
    });
    return result;
}