URL.protocol
La propriété protocol
de l'interface URL
est une USVString
représentant le schéma protocolaire de URL, incluant ':'
à la fin.
Note: Cette fonctionnalité est disponible via les Web Workers
Syntaxe
string = object.protocol; object.protocol = string;
Valeur
Un USVString
.
Exemples
var url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol');
var result = url.protocol; // Retourne:"https:"
Spécifications
Spécification | Statut | Commentaire |
---|---|---|
URL La définition de 'protocol' dans cette spécification. |
Standard évolutif | Définition initiale. |
Compatibilité des navigateurs
BCD tables only load in the browser
A voir également
- L'interface
URL
dont il est contenu.