Writing to console.log specifically
まだ誰も着手していません。
- 主要言語
- Ruby
- スター
- 875
- フォーク
- 68
- 平均マージ
- 9日 5時間
- マージ済み PR(30日)
- 1
説明
In the FAQ currently we have code like this:
$stdout = Object.new.tap { |obj|
def obj.write(i)
JS.global[:document].write(i)
end
}
Then we can simply use puts, which is convenient.
But how to write to console.log?
Past this point if we use:
JS.global[:document].write "foobar"
It will no longer write to console.log, instead just to primary stdout in the browser.
Is there a way to still write to console.log somehow? Could this be added to FAQ?
If not, could there be a way to show this? I'd like to get debug-like output right
via console.log() as well, so being able to write onto console.log even when having
modified $stdout, would be convenient, in my opinion. Could such a way be added
in addition to ruby.wasm?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
$stdout、JS.global、ブラウザ出力に関するFAQの例から始めてください。$stdoutを置き換えた後も利用可能なconsole.logへの経路をruby.wasmがすでに提供しているかどうかを確認してください。提供している場合はFAQに記載し、提供していない場合は実装を提案する前に不足している機能を定義してください。console.logの動作と、リダイレクトされたstdoutとの相互作用が明確に文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ruby, wasm
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100