1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32

content / test / data / has-ua-visual-transition.html [blame]

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Navigation API Example</title>
    <script>
        var hasUAVisualTransitionValue = false;
        // Check if the browser supports the Navigation API
        if ('navigation' in window) {
            window.navigation.addEventListener('navigate', (event) => {
                hasUAVisualTransitionValue = event.hasUAVisualTransition;
            });
        } else {
            console.log('Navigation API is not supported in this browser.');
        }
    </script>
</head>
<body>
    <h1>Value of hasUAVisualTransition of Navigation API</h1>
    <div>
        <a href="#frag1"> Section 1 </a>
        <a href="#frag2"> Section 2 </a>
    </div>
    <div class="section" id="frag1">
        <p> This is section 1</p>
    </div>
    <div class="section" id="frag2">
        <p> This is section 2 </p>
    </div>
</body>
</html>