CharacterData: appendData() メソッド
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
appendData()
は CharacterData
インターフェイスのメソッドで、指定されたデータをこのノードの現在のデータの末尾に追加します。
構文
js
appendData(data)
引数
data
-
現在のノードに追加するデータです。
返値
なし。
例
html
<span>結果: </span>テキスト
js
const span = document.querySelector("span");
const textnode = span.nextSibling;
textnode.appendData(" - 追加テキスト");
仕様書
Specification |
---|
DOM # dom-characterdata-appenddata |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
appendData |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.