Markdown.Sanitizer.js should not use global window variable
- 主要語言
- JavaScript
- 星號
- 0
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
描述
```
We are trying to use Markdown.Sanitizer.js in Acre (a server-side javascript
environement).
However, we find ourselves hacking a window object to use Markdown.Sanitizer.js.
But if Markdown.Sanitizer.js passes "this" as the "window" variable, we can use
Markdown.Sanitizer.js on the server-side as is:
(function(window) {
...
})(this);
```
Original issue reported on code.google.com by `daep...@google.com` on 24 Sep 2012 at 2:59
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Look at Markdown.Sanitizer.js in the repository to see how it currently references the global window variable. The change is to wrap the code in a function that takes 'this' as the window parameter, making it work in server-side environments like Acre. Test by checking if the script runs without a browser window object after the modification.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- tooling
- Issue 類型
- 重構
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100