MCPcopy Index your code
hub / github.com/pyscript/pyscript / remove

Method remove

core/src/stdlib/pyscript/web.py:773–785  ·  view source on GitHub ↗

Remove a CSS class. Will log a warning if the class is not present, but will not raise an error.

(self, class_name)

Source from the content-addressed store, hash-verified

771 self._class_list.add(name)
772
773 def remove(self, class_name):
774 """
775 Remove a CSS class.
776
777 Will log a warning if the class is not present, but will not raise an
778 error.
779 """
780 for name in self._extract_class_names(class_name):
781 if name in self:
782 super().remove(name)
783 self._class_list.remove(name)
784 else:
785 console.warn(f"Class '{name}' not found in element classes.")
786
787 def discard(self, class_name):
788 """

Callers 15

getFunction · 0.45
_createAlertBannerFunction · 0.45
remove_listenerMethod · 0.45
discardMethod · 0.45
clearMethod · 0.45
removeMethod · 0.45
constructorMethod · 0.45
_linkLeaveMethod · 0.45
_handleTextAreaBlurMethod · 0.45
bindMouseMethod · 0.45
updateCursorStyleMethod · 0.45
_refreshStyleMethod · 0.45

Calls 2

_extract_class_namesMethod · 0.95
warnMethod · 0.80

Tested by 2

test_add_remove_classMethod · 0.36