mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibWeb: Add "navigator" object and expose navigator.userAgent
A lot of web content looks for this property. We'll probably have to tweak this as we go, but at least now we have it. :^)
This commit is contained in:
parent
6e5f9e20eb
commit
a2b0cc8f08
4 changed files with 104 additions and 2 deletions
|
@ -16,11 +16,18 @@ body {
|
|||
h1 {
|
||||
color: #a00;
|
||||
}
|
||||
span#ua {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.getElementById("ua").innerHTML = navigator.userAgent;
|
||||
</script>
|
||||
</head>
|
||||
<body link="#44f" vlink="#c4c" background="90s-bg.png">
|
||||
<h1>Welcome to the Serenity Browser!</h1>
|
||||
<p>This is a very simple browser built on the LibWeb engine.</p>
|
||||
<p>This is a very simple browser built on the LibWeb and LibJS engines.</p>
|
||||
<p>Your user agent is: <span id="ua"></span></p>
|
||||
<p>Some small test pages:</p>
|
||||
<ul>
|
||||
<li><a href="qsa.html">querySelectorAll test</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue