Plugin.name - 名前
nameは、Pluginのプロパティです。プラグインの名前を返します。
概要
- 名前
- name
- 所属
- Plugin
- IDL
readonly attribute DOMString name;
- 仕様書
- https://html.spec.whatwg.org/multipage/system-state.html#dom-plugin-name
説明
プラグインの名前を表す文字列を返す。
デモ
Plugin.nameのデモです。
<!-- このコードは編集できます。 -->
<!DOCTYPE html>
<html>
<head>
<style>
div#result {
white-space: pre-wrap ;
}
</style>
</head>
<body>
<div id="result"></div>
<script>
var resultElement = document.getElementById( "result" ) ;
var pluginArray = navigator.plugins ;
resultElement.textContent = pluginArray + "\n\n" ;
for( var i=0,l=pluginArray.length; l>i; i++ ) {
var plugin = pluginArray[i] ;
console.log( plugin ) ;
resultElement.textContent += "[" + i + "]" + plugin + "\n" ;
resultElement.textContent += "\t" + "name: " + plugin.name + "\n" ;
resultElement.textContent += "\t" + "filename: " + plugin.filename + "\n" ;
resultElement.textContent += "\t" + "description: " + plugin.description + "\n" ;
resultElement.textContent += "\t" + "length: " + plugin.length + "\n\n" ;
}
</script>
</body>
</html>
サポート状況
Chrome | Firefox | Safari | Edge | IE | Opera | iOS Safari | Android |
---|---|---|---|---|---|---|---|
● | ● | ● | ● | ● 11+ | ● | ● | ● 4.0+ |
関連記事
- Plugin.filename
- filenameは、Pluginのプロパティです。プラグインのファイル名を返します。
- Plugin.length
- lengthは、Pluginのプロパティです。プラグインに関連付けられているmime typeの数を返します。
- Plugin.description
- descriptionは、Pluginのプロパティです。プラグインの詳細を返します。
- Plugin.namedItem()
- namedItem()は、Pluginのメソッドです。プラグインに関連付けられているmime typeの1つを、名前から取得します。mime typeの名前は、MimeType.typeの値です。