Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1084905 of HTMLHyperlinkElementUtils.password

  • Revision slug: Web/API/HTMLHyperlinkElementUtils/password
  • Revision title: HTMLHyperlinkElementUtils.password
  • Revision id: 1084905
  • Created:
  • Creator: Tigt
  • Is current revision? Yes
  • Comment

Revision Content

{{ApiRef("URL API")}}

The HTMLHyperlinkElementUtils.password property is a {{domxref("USVString")}} containing the password specified before the domain name.

If it is set without first setting the username property, it silently fails.

Syntax

string = object.password;
object.password = string;

Examples

// Let's <a id="myAnchor" href="https://anonymous:[email protected]/en-US/docs/HTMLHyperlinkElementUtils.username"> be in the document
var anchor = document.getElementByID("myAnchor");
var result = anchor.password; // Returns:'flabada'

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', '#dom-hyperlink-prassword', 'HTMLHyperlinkElementUtils.password')}} {{Spec2('HTML WHATWG')}} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatNo}} {{CompatGeckoDesktop("26")}} [1] {{CompatNo}} {{CompatNo}} {{CompatNo}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatNo}} {{CompatNo}} {{CompatGeckoMobile("26")}} [1] {{CompatNo}} {{CompatNo}} {{CompatNo}}

[2] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

See also

  • The {{domxref("HTMLHyperlinkElementUtils")}} mixin it belongs to.

Revision Source

<p>{{ApiRef("URL API")}}</p>

<p>The HTMLHyperlinkElementUtils<strong><code>.password</code></strong> property is a {{domxref("USVString")}} containing the password specified before the domain name.</p>

<p>If it is set without first setting the <code><a href="/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username">username</a></code> property, it silently fails.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">
<em>string</em> = <em>object</em>.password;
<em>object</em>.password = <em>string</em>;
</pre>

<h2 id="Examples">Examples</h2>

<pre class="brush: js">
// Let's &lt;a id="myAnchor" href="https://anonymous:[email protected]/en-US/docs/HTMLHyperlinkElementUtils.username"&gt; be in the document
var anchor = document.getElementByID("myAnchor");
var result = anchor.password; // Returns:'flabada'
</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', '#dom-hyperlink-prassword', 'HTMLHyperlinkElementUtils.password')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{ CompatibilityTable() }}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoDesktop("26")}} [1]</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoMobile("26")}} [1]</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[2] From Gecko 26 to Gecko 44, this property was on the <code>URLUtils</code> mixin. It has been moves either on the <code>HTMLHyperlinkElementUtils</code> mixin, or directly on the interface.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>The {{domxref("HTMLHyperlinkElementUtils")}} mixin it belongs to.</li>
</ul>
Revert to this revision