Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@guidotripaldi
Copy link
Contributor

No description provided.

{:ok, ret} = query_one(socket, "button", :style)
assert ret["style"]["cssText"] == "background-color: red; width: 200px;"

assert {:ok, :broadcasted} ==

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

{:ok, ret} = query_one(socket, "a", :attributes)
assert ret["attributes"]["href"] == "https://tg.pl/drab"

assert {:ok, :broadcasted} ==

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

{:ok, ret} = query_one(socket, "button", :dataset)
assert ret["dataset"]["foo"] == "bar"

assert {:ok, :broadcasted} ==

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

assert {:ok, 1} == set_html(socket, "#my_element", html)
assert %{"innerHTML" => html} == query_one!(socket, "#my_element", :innerHTML)

assert {:ok, :broadcasted} ==

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 12 possible new issues (including those that may have been commented here).
  • 9 fixed issues! 🎉

But beware that this branch is 58 commits behind the grych:master branch, and a review of an up to date branch would produce more accurate results.

You can see more details about this review at https://ebertapp.io/github/grych/drab/pulls/135.

See `Drab.Core.broadcast_js/2` for broadcasting options.
"""
@spec broadcast_style(Drab.Core.subject(), String.t(), map | Keyword.t()) :: Drab.Core.result()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return of broadcasting functions should be type of Drab.Core.bcast_result()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes! Damned copy/past..

@doc """
Exception-throwing version of `broadcast_style/3`
"""
@spec broadcast_style!(Drab.Core.subject(), String.t(), map | Keyword.t()) :: Drab.Core.return() | no_return
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to have bang versions of broadcasting functions, as they work in "fire and forget" regime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I saw that the bang version for broadcast_js exist so I thinked it was better to add these versions

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, it should not be there, I am going to depreciate this.

@grych grych merged commit c26ef92 into grych:master May 29, 2018
@guidotripaldi guidotripaldi deleted the feature/element_missing_broadcast branch August 31, 2018 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants