Conversation
test/integration/element_test.exs
Outdated
| {:ok, ret} = query_one(socket, "button", :style) | ||
| assert ret["style"]["cssText"] == "background-color: red; width: 200px;" | ||
|
|
||
| assert {:ok, :broadcasted} == |
There was a problem hiding this comment.
There should be no trailing white-space at the end of a line.
test/integration/element_test.exs
Outdated
| {:ok, ret} = query_one(socket, "a", :attributes) | ||
| assert ret["attributes"]["href"] == "https://tg.pl/drab" | ||
|
|
||
| assert {:ok, :broadcasted} == |
There was a problem hiding this comment.
There should be no trailing white-space at the end of a line.
test/integration/element_test.exs
Outdated
| {:ok, ret} = query_one(socket, "button", :dataset) | ||
| assert ret["dataset"]["foo"] == "bar" | ||
|
|
||
| assert {:ok, :broadcasted} == |
There was a problem hiding this comment.
There should be no trailing white-space at the end of a line.
test/integration/element_test.exs
Outdated
| assert {:ok, 1} == set_html(socket, "#my_element", html) | ||
| assert %{"innerHTML" => html} == query_one!(socket, "#my_element", :innerHTML) | ||
|
|
||
| assert {:ok, :broadcasted} == |
There was a problem hiding this comment.
There should be no trailing white-space at the end of a line.
|
Ebert has finished reviewing this Pull Request and has found:
But beware that this branch is 58 commits behind the You can see more details about this review at https://ebertapp.io/github/grych/drab/pulls/135. |
lib/drab/element.ex
Outdated
|
|
||
| See `Drab.Core.broadcast_js/2` for broadcasting options. | ||
| """ | ||
| @spec broadcast_style(Drab.Core.subject(), String.t(), map | Keyword.t()) :: Drab.Core.result() |
There was a problem hiding this comment.
Return of broadcasting functions should be type of Drab.Core.bcast_result()
There was a problem hiding this comment.
ah, yes! Damned copy/past..
lib/drab/element.ex
Outdated
| @doc """ | ||
| Exception-throwing version of `broadcast_style/3` | ||
| """ | ||
| @spec broadcast_style!(Drab.Core.subject(), String.t(), map | Keyword.t()) :: Drab.Core.return() | no_return |
There was a problem hiding this comment.
There is no need to have bang versions of broadcasting functions, as they work in "fire and forget" regime.
There was a problem hiding this comment.
ok. I saw that the bang version for broadcast_js exist so I thinked it was better to add these versions
There was a problem hiding this comment.
True, it should not be there, I am going to depreciate this.
No description provided.