-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add jsheaders #56
Add jsheaders #56
Conversation
src/fusion/js/jsheaders.nim
Outdated
when not defined(js) and not defined(nimdoc): | ||
{.fatal: "Module jsheaders is designed to be used with the JavaScript backend.".} | ||
|
||
type Headers* = ref object ## HTTP Headers for the JavaScript target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think this should be
ref object of JsRoot
- we also need to fix similar errors in stdlib:
lib/js/dom.nim:1213:28: TouchList* {.importc.} = ref object of RootObj
lib/js/dom.nim:1293:26: TimeOut* {.importc.} = ref object of RootObj
lib/js/jsconsole.nim:16:17:type Console* = ref object of RootObj
lib/js/jsffi.nim:87:15: JsObject* = ref object of JsRoot
lib/js/jsffi.nim:89:27: JsAssoc*[K: JsKey, V] = ref object of JsRoot
PR's welcome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it was correct because stdlib uses it, maybe documentation needs to be more explicit on that. 🤔
Too bad theres not a Linter for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after addressing last 2 points
@juancarlospaco ok, can you find another reviewer to get a 2nd LGTM so we can merge this? |
jsheaders
module forHeaders
for the JavaScript target.See Add jsxmlserializer Nim#16339 (comment) and Add jsxmlserializer Nim#16339 (comment) and Add jsxmlhttprequest #57 (comment) and Add jsheaders #56 (comment) and Add jsxmlserializer #55 (comment)
and Add jsform #58 (comment)