mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Dont send add and remove class calls if no comm exists
This commit is contained in:
parent
c31ad5cf78
commit
0f34affc35
@ -304,6 +304,7 @@ class Widget(LoggingConfigurable):
|
||||
JQuery selector to select the DOM element(s) that the class(es) will
|
||||
be added to.
|
||||
"""
|
||||
if self._comm is not None:
|
||||
self._comm.send({"method": "add_class",
|
||||
"class_list": class_name,
|
||||
"selector": selector})
|
||||
@ -321,6 +322,7 @@ class Widget(LoggingConfigurable):
|
||||
JQuery selector to select the DOM element(s) that the class(es) will
|
||||
be removed from.
|
||||
"""
|
||||
if self._comm is not None:
|
||||
self._comm.send({"method": "remove_class",
|
||||
"class_list": class_name,
|
||||
"selector": selector})
|
||||
|
Loading…
Reference in New Issue
Block a user