Fix the python side of the add/remove class functions to send custom messages

This commit is contained in:
Jason Grout 2014-01-01 17:01:40 -07:00 committed by Jonathan Frederic
parent 44e2043afe
commit b41f77e635

View File

@ -416,9 +416,9 @@ class Widget(BaseWidget):
JQuery selector to select the DOM element(s) that the class(es) will
be added to.
"""
self._send({"method": "add_class",
"class_list": class_name,
"selector": selector})
self.send({"msg_type": "add_class",
"class_list": class_name,
"selector": selector})
def remove_class(self, class_name, selector=""):
@ -433,6 +433,6 @@ class Widget(BaseWidget):
JQuery selector to select the DOM element(s) that the class(es) will
be removed from.
"""
self._send({"method": "remove_class",
"class_list": class_name,
"selector": selector})
self.send({"msg_type": "remove_class",
"class_list": class_name,
"selector": selector})