Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 586090452
  • Loading branch information
colaboratory-team committed Nov 28, 2023
1 parent dc427c8 commit e12bed2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/colab/output/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""Colabs output package."""
# pylint: disable=g-multiple-import
from google.colab.output._area import redirect_to_element, to_default_area, to_footer_area, to_header_area
from google.colab.output._js import eval_js, register_callback
from google.colab.output._js import deregister_callback, eval_js, register_callback
from google.colab.output._tags import clear, temporary, use_tags
from google.colab.output._util import serve_kernel_port_as_iframe, serve_kernel_port_as_window
from google.colab.output._widgets import enable_custom_widget_manager, disable_custom_widget_manager
from google.colab.output._widgets import disable_custom_widget_manager, enable_custom_widget_manager
9 changes: 9 additions & 0 deletions google/colab/output/_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ def register_callback(function_name, callback):
_functions[function_name] = callback


def deregister_callback(function_name):
"""Removes a function previously registered by register_callback.
Args:
function_name: string
"""
del _functions[function_name]


def _invoke_function(function_name, json_args, json_kwargs):
"""Invokes callback with given function_name.
Expand Down

0 comments on commit e12bed2

Please sign in to comment.