CharacterData: substringData() メソッド
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.
substringData()
は CharacterData
インターフェイスのメソッドで、既存のデータの一部を、指定した位置から始まり、指定した文字数分のデータを返します。
構文
js
domString = characterData.substringData(offset, count)
引数
返値
文字列型で部分文字列を返します。
例外
IndexSizeError
DOMException
-
offset
+count
が内容のデータの長さよりも大きかった場合に発生します。
仕様書
Specification |
---|
DOM # dom-characterdata-substringdata |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
substringData |
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.