Skip to content

Commit

Permalink
2023/04/07 時点の英語版に基づき更新
Browse files Browse the repository at this point in the history
  • Loading branch information
mfuji09 committed Oct 18, 2024
1 parent 4a7cef8 commit 14d8211
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
7 changes: 4 additions & 3 deletions files/ja/web/api/htmlanchorelement/host/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "HTMLAnchorElement: host プロパティ"
short-title: host
slug: Web/API/HTMLAnchorElement/host
l10n:
sourceCommit: a3d9f61a8990ba7b53bda9748d1f26a9e9810b18
Expand All @@ -18,14 +19,14 @@ l10n:
```js
const anchor = document.createElement("a");

anchor.href = "https://developer.mozilla.org/en-US/HTMLAnchorElement";
anchor.href = "https://developer.mozilla.org/ja/HTMLAnchorElement";
anchor.host === "developer.mozilla.org";

anchor.href = "https://developer.mozilla.org:443/en-US/HTMLAnchorElement";
anchor.href = "https://developer.mozilla.org:443/ja/HTMLAnchorElement";
anchor.host === "developer.mozilla.org";
// The port number is not included because 443 is the scheme's default port

anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLAnchorElement";
anchor.href = "https://developer.mozilla.org:4097/ja/HTMLAnchorElement";
anchor.host === "developer.mozilla.org:4097";
```

Expand Down
5 changes: 3 additions & 2 deletions files/ja/web/api/htmlanchorelement/href/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "HTMLAnchorElement: href プロパティ"
short-title: href
slug: Web/API/HTMLAnchorElement/href
l10n:
sourceCommit: a3d9f61a8990ba7b53bda9748d1f26a9e9810b18
Expand All @@ -16,9 +17,9 @@ l10n:
##

```js
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLAnchorElement"> 要素が文書にあったとします
// <a id="myAnchor" href="https://developer.mozilla.org/ja/HTMLAnchorElement"> 要素が文書にあったとします
const anchor = document.getElementById("myAnchor");
anchor.href; // returns 'https://developer.mozilla.org/en-US/HTMLAnchorElement'
anchor.href; // returns 'https://developer.mozilla.org/ja/HTMLAnchorElement'
```

## 仕様書
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/htmlanchorelement/password/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "HTMLAnchorElement: password プロパティ"
short-title: password
slug: Web/API/HTMLAnchorElement/password
l10n:
sourceCommit: a3d9f61a8990ba7b53bda9748d1f26a9e9810b18
Expand All @@ -18,7 +19,7 @@ l10n:
##

```js
// <a id="myAnchor" href="https://anonymous:[email protected]/en-US/HTMLAnchorElement"> 要素が文書にあったとします
// <a id="myAnchor" href="https://anonymous:[email protected]/ja/HTMLAnchorElement"> 要素が文書にあったとします
const anchor = document.getElementByID("myAnchor");
anchor.password; // 'flabada' を返す
```
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/htmlanchorelement/protocol/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "HTMLAnchorElement: protocol プロパティ"
short-title: protocol
slug: Web/API/HTMLAnchorElement/protocol
l10n:
sourceCommit: a3d9f61a8990ba7b53bda9748d1f26a9e9810b18
Expand All @@ -18,7 +19,7 @@ l10n:
### アンカーリンクのプロトコルを取得

```js
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLAnchorElement"> 要素が文書にあったとします。
// <a id="myAnchor" href="https://developer.mozilla.org/ja/HTMLAnchorElement"> 要素が文書にあったとします。
const anchor = document.getElementById("myAnchor");
anchor.protocol; // 'https:' を返す
```
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/htmlanchorelement/referrerpolicy/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "HTMLAnchorElement: referrerPolicy プロパティ"
short-title: referrerPolicy
slug: Web/API/HTMLAnchorElement/referrerPolicy
l10n:
sourceCommit: a3d9f61a8990ba7b53bda9748d1f26a9e9810b18
Expand Down Expand Up @@ -38,7 +39,7 @@ l10n:
const elt = document.createElement("a");
const linkText = document.createTextNode("My link");
elt.appendChild(linkText);
elt.href = "https://developer.mozilla.org/en-US/";
elt.href = "https://developer.mozilla.org/ja/";
elt.referrerPolicy = "no-referrer";

const div = document.getElementById("divAround");
Expand Down

0 comments on commit 14d8211

Please sign in to comment.