Skip to content

Commit 35a5143

Browse files
committed
Remove method Node._check_modifiable() (#16)
1 parent 44cbde2 commit 35a5143

File tree

1 file changed

+2
-11
lines changed
  • w3/python/core/fundamental_interface

1 file changed

+2
-11
lines changed

w3/python/core/fundamental_interface/Node.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ def __init__(self,
9090
self._owner_document: Optional[_Document]
9191
self._read_only: bool
9292

93-
def _check_modifiable(self) -> None:
94-
"""Checks if this node is modifiable.
95-
96-
Raises:
97-
DOMException:
98-
- `NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.
99-
"""
100-
if self._read_only:
101-
raise DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR)
102-
10393
@property
10494
def node_name(self) -> DOMString:
10595
"""Read only; The name of this node, depending on its type."""
@@ -131,7 +121,8 @@ def _set_node_value(self, value: DOMString) -> None:
131121
DOMException:
132122
- `NO_MODIFICATION_ALLOWED_ERR`: Raised when the node is readonly.
133123
"""
134-
self._check_modifiable()
124+
if self._read_only:
125+
raise DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR)
135126
self._node_value = DOMString(value)
136127

137128
@property

0 commit comments

Comments
 (0)