Writing to console.log specifically
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- ruby, wasm
研究方向
從涉及 $stdout、JS.global 和瀏覽器輸出的 FAQ 範例開始。確定 ruby.wasm 是否已經提供一條在替換 $stdout 後仍可用的 console.log 路徑;如果有,請在 FAQ 中記錄它;如果沒有,請在提出實作方案之前定義缺少的能力。只有在 console.log 的行為及其與重新導向 stdout 的互動得到清楚記錄後,才算完成。
由索引模型根據 Issue 內容生成。
描述
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?
- 主要語言
- Ruby
- 星號
- 875
- 分支
- 68
- 平均合併
- 9 天 5 小時
- 30 天內合併 PR
- 1
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ruby/ruby.wasm 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 5/5 一週以上 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 5/5 一週以上 新手友好度 25/100
-
難度 5/5 一週以上 新手友好度 25/100
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 88/100
rubocop/ruby-style-guide#984 ·
-
internal product:dev-portal release-docs
難度 2/5 1-3 小時 新手友好度 68/100
Kong/developer.konghq.com#7393 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
fastlane/fastlane#30286 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
TheOdinProject/curriculum#31432 · 1 則留言 ·
維護者通常 1 天內回覆
-
area/web interface
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆