 
   Always returns `{:ok, :broadcasted}`.
 
-  See `Drab.Core.broadcast_js/2` for broadcasting options.  
+  See `Drab.Core.broadcast_js/2` for broadcasting options.
   """
   @spec broadcast_html(Drab.Core.subject(), String.t(), String.t()) :: Drab.Core.bcast_result()
   def broadcast_html(subject, selector, html) do


  Always returns `{:ok, :broadcasted}`.

  See `Drab.Core.broadcast_js/2` for broadcasting options.  
  """
  @spec broadcast_data(Drab.Core.subject(), String.t(), map | Keyword.t()) :: Drab.Core.bcast_result()
  def broadcast_data(subject, selector, dataset) when is_list(dataset) or is_map(dataset) do

    case Map.keys(map) do
      [] -> nil
      [key] -> map[key]
      _ -> raise Drab.JSExecutionError, message: query_one_error_message(map, selector)
    end
  end

