Skip to content

Commit

Permalink
Clarify that the function is smart cell specific
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko authored Sep 5, 2024
1 parent 1cf5594 commit ea6b961
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions lib/kino/test.ex
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,6 @@ defmodule Kino.Test do
send(kino.pid, {:event, event, payload, %{origin: inspect(self())}})
end

@doc """
Sends an editor source event to a `Kino.JS.Live` kino.
## Examples
push_editor_source(kino, "source code")
"""
def push_editor_source(kino, source_code) do
send(kino.pid, {:editor_source, source_code})
end

@doc """
Connects to a `Kino.JS.Live` kino and returns the initial data.
Expand Down Expand Up @@ -197,4 +185,19 @@ defmodule Kino.Test do
unquote(timeout)
end
end

@doc """
Sends a changed smart cell editor source to a `Kino.JS.Live` kino.
This is going to call `c:Kino.SmartCell.handle_editor_change/2` implementation
in the smart cell module.
## Examples
push_smart_cell_editor_source(kino, "source code")
"""
def push_smart_cell_editor_source(kino, source) do
send(kino.pid, {:editor_source, source})
end
end

0 comments on commit ea6b961

Please sign in to comment.