Metoda HTML DOM Node isSupported()
Przykład
Sprawdź, czy funkcja Core w wersji 2.0 jest obsługiwana dla elementu <button>:
var item = document.getElementsByTagName("BUTTON")[0];
item.isSupported("Core", "2.0");
Definicja i użycie
Metoda isSupported() sprawdza, czy określona funkcja jest obsługiwana dla określonego węzła.
Uwaga: ta metoda jest przestarzała w wielu przeglądarkach. Staraj się go unikać.
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę metodę.
Method | |||||
---|---|---|---|---|---|
isSupported() | Not supported | 9.0 | Not supported | Yes | Not supported |
Uwaga: ta metoda była wcześniej obsługiwana w Chrome, Firefox i Opera, ale już jej nie obsługują.
Składnia
node.isSupported(feature, version)
Parametry
Parameter | Type | Description |
---|---|---|
feature | String | Required. Defines the feature you want to check if is supported |
version | String | Optional. Defines the version of the feature you want to check if is supported |
Szczegóły techniczne
Wartość zwrotu: | Wartość logiczna, zwraca prawdę, jeśli funkcja jest obsługiwana, w przeciwnym razie fałsz |
---|---|
Wersja DOM | Obiekt węzła podstawowego poziomu 2 |