mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibWeb: Add a simple window.location object with some getters :^)
This commit is contained in:
parent
a1e7aa330c
commit
1ec4db04cd
6 changed files with 162 additions and 0 deletions
17
Base/home/anon/www/location.html
Normal file
17
Base/home/anon/www/location.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>window.location test</title>
|
||||
</head>
|
||||
<body>
|
||||
<pre></pre>
|
||||
<script>
|
||||
var pre = document.querySelectorAll("pre")[0];
|
||||
pre.innerHTML += "href: " + location.href + '\n';
|
||||
pre.innerHTML += "hostname: " + location.hostname + '\n';
|
||||
pre.innerHTML += "pathname: " + location.pathname+ '\n';
|
||||
pre.innerHTML += "hash: " + location.hash + '\n';
|
||||
pre.innerHTML += "search: " + location.search + '\n';
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -28,6 +28,7 @@ span#ua {
|
|||
<p>Your user agent is: <b><span id="ua"></span></b></p>
|
||||
<p>Some small test pages:</p>
|
||||
<ul>
|
||||
<li><a href="location.html">window.location property</a></li>
|
||||
<li><a href="percent-css.html">CSS percentage values</a></li>
|
||||
<li><a href="inline-block.html">display: inline-block; test</a></li>
|
||||
<li><a href="canvas-path-quadratic-curve.html">canvas path quadratic curve test</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue