1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[js] document.URL (written uppercase)

This commit is contained in:
Witold Filipczyk 2021-05-25 16:55:04 +02:00
parent 9a0b89e189
commit 97e1e86e66
2 changed files with 20 additions and 1 deletions

View File

@ -936,7 +936,7 @@ JSPropertySpec document_props[] = {
JS_PSG("referrer", document_get_property_referrer, JSPROP_ENUMERATE),
JS_PSG("scripts", document_get_property_scripts, JSPROP_ENUMERATE),
JS_PSGS("title", document_get_property_title, document_set_property_title, JSPROP_ENUMERATE), /* TODO: Charset? */
JS_PSGS("url", document_get_property_url, document_set_property_url, JSPROP_ENUMERATE),
JS_PSGS("URL", document_get_property_url, document_set_property_url, JSPROP_ENUMERATE),
JS_PS_END
};

19
test/ecmascript/URL.html Normal file
View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<body>
<p>Click the button to display the URL of the document.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.URL;
alert(x);
}
</script>
</body>
</html>