Channel circle › core 7 Container › js
js (core 7, sub 14, flat id 126)
130 functions
| Signature | Purpose | Source | Scope |
|---|---|---|---|
| static uint64_t JSNowUs(void) | (no comment) | jschannel/JSChannel.c:37 | static |
| static void JSPost(uint32_t op, uint32_t arg) | (no comment) | jschannel/JSChannel.c:38 | static |
| static int JscAllocUnit(struct JscUnit *u) | (no comment) | jschannel/JSChannel.c:65 | static |
| static uint32_t VmU32(void *vm, uint32_t off) | (no comment) | jschannel/JSChannel.c:93 | static |
| static void VmSetU32(void *vm, uint32_t off, uint32_t v) | (no comment) | jschannel/JSChannel.c:94 | static |
| static void * VmPtr(void *vm, uint32_t off) | (no comment) | jschannel/JSChannel.c:95 | static |
| static void * ImgDup(const void *p, size_t n) | (no comment) | jschannel/JSChannel.c:96 | static |
| static void ImgFreeUnit(struct JscUnit *u) | (no comment) | jschannel/JSChannel.c:97 | static |
| static struct JscUnit * ImgCopyUnit(const struct JscUnit *s) | (no comment) | jschannel/JSChannel.c:104 | static |
| static void JscImgRetire(struct JSChannel *c) | (no comment) | jschannel/JSChannel.c:124 | static |
| static int JscImgBind(struct JSChannel *c) | (no comment) | jschannel/JSChannel.c:142 | static |
| static int JscImgInit(struct JSChannel *c) | (no comment) | jschannel/JSChannel.c:154 | static |
| static void JscImgFree(struct JSChannel *c) | (no comment) | jschannel/JSChannel.c:163 | static |
| static void JscFree(struct JSChannel *c) | JSCHANNEL-M5B END | jschannel/JSChannel.c:174 | static |
| static void RtOpen(struct Channel *c) | (no comment) | jschannel/JSChannel.c:191 | static |
| void CloseJSChannel(struct Channel *ch) | (no comment) | jschannel/JSChannel.c:193 | public |
| struct JSChannel * OpenJSChannel(void) | (no comment) | jschannel/JSChannel.c:203 | public |
| uint64_t JoinJSChannel(void *peer) | (no comment) | jschannel/JSChannel.c:234 | public |
| void * LeaveJSChannel(void *peer) | (no comment) | jschannel/JSChannel.c:244 | public |
| static void Put32(uint8_t *p, uint32_t v) | (no comment) | jschannel/JSChannel.c:253 | static |
| static uint32_t Get32(const uint8_t *p) | (no comment) | jschannel/JSChannel.c:254 | static |
| static int JscOut(struct JSChannel *c, uint32_t op, const void *head, uint32_t hl, const void *body, uint32_t bl) | queue one response record; payload = head (hl bytes) + body (bl bytes) | jschannel/JSChannel.c:257 | static |
| static void JscErr(struct JSChannel *c, uint32_t req, uint32_t code, uint32_t pos, uint32_t line) | (no comment) | jschannel/JSChannel.c:271 | static |
| static int TmMentions(const uint8_t *s, uint32_t n) | (no comment) | jschannel/JSChannel.c:315 | static |
| static int TmRunSrc(struct JSChannel *c, const char *src, uint32_t n) | compile + run a host script in the unit; then put the caller's loaded unit back. <0 error, else status | jschannel/JSChannel.c:326 | static |
| static void TmInstall(struct JSChannel *c) | (no comment) | jschannel/JSChannel.c:347 | static |
| static void TmTick(struct JSChannel *c) | JS_TICK with timers installed and no run in progress: fire what is due. Result record only when one ran. | jschannel/JSChannel.c:360 | static |
| static void EvCompile(struct JSChannel *c, const uint8_t *src, uint32_t n) | JSCHANNEL-M6A END | jschannel/JSChannel.c:381 | static |
| static void EvLoad(struct JSChannel *c, uint32_t req, const uint8_t *buf, uint32_t n) | (no comment) | jschannel/JSChannel.c:403 | static |
| static void JscDispatch(struct JSChannel *c, uint32_t ev, const uint8_t *p, uint32_t n) | (no comment) | jschannel/JSChannel.c:425 | static |
| uint64_t WriteJSChannel(void *ch, void *buf, long len) | Write: one or more records. Returns bytes consumed (all of them; a bad tail queues ERROR BADREC). | jschannel/JSChannel.c:485 | public |
| uint64_t ReadJSChannel(void *ch, void *buf, long len) | Read: next response record. Returns its size, 0 if none, (uint64_t)-1 if buf too small. | jschannel/JSChannel.c:502 | public |
| static uint64_t Ld64(const uint8_t *p) | ---- EditorChannel I/O ---- | jschannel/JSDom.c:58 | static |
| static uint32_t Ld32(const uint8_t *p) | (no comment) | jschannel/JSDom.c:59 | static |
| static uint32_t EdCall(struct JSDom *d, uint32_t op, uint64_t pos, uint32_t del, const void *data, uint32_t dl, uint64_t *ver, const uint8_t **pl, uint32_t *pn) | (no comment) | jschannel/JSDom.c:60 | static |
| static int FetchDoc(struct JSDom *d) | (no comment) | jschannel/JSDom.c:74 | static |
| static void SyncDoc(struct JSDom *d) | the buffer moved under us (UNDO/REDO, another session): refetch, every space-0 handle dies | jschannel/JSDom.c:91 | static |
| static int Scan(struct JSDom *d, uint32_t sp) | ---- scan cache ---- | jschannel/JSDom.c:101 | static |
| static int NodeOf(struct JSDom *d, uint32_t hi, struct EdtBmlNode *out, uint32_t *idx) | (no comment) | jschannel/JSDom.c:109 | static |
| static uint32_t Handle(struct JSDom *d, uint32_t sp, uint64_t off) | (no comment) | jschannel/JSDom.c:116 | static |
| static void Adjust(struct JSDom *d, uint32_t sp, uint64_t rs, uint64_t re_old, int64_t delta) | bytes [rs, re_old) of space sp became [rs, re_old + delta): shift later handles, kill the ones inside | jschannel/JSDom.c:129 | static |
| static int NewSpace(struct JSDom *d, const uint8_t *node, uint64_t n) | (no comment) | jschannel/JSDom.c:138 | static |
| static void FreeSpace(struct JSDom *d, uint32_t s) | (no comment) | jschannel/JSDom.c:151 | static |
| static int Splice(struct JSDom *d, uint32_t sp, uint64_t rs, uint64_t re, const uint8_t *ins, uint64_t n, uint32_t op, uint64_t op_pos, const uint8_t *op_data, uint32_t op_dl) | replace [rs, re) of space sp by (ins, n). Space 0 goes through an EditorChannel op (op, pos, data). | jschannel/JSDom.c:159 | static |
| static int LcEq(const uint8_t *a, uint32_t an, const char *b) | ---- names ---- | jschannel/JSDom.c:186 | static |
| static int TagOp(const uint8_t *s, uint32_t n) | (no comment) | jschannel/JSDom.c:192 | static |
| static int AttrID(const uint8_t *s, uint32_t n) | (no comment) | jschannel/JSDom.c:198 | static |
| static uint32_t Ld16(const uint8_t *p) | (no comment) | jschannel/JSDom.c:205 | static |
| static int IsStr(uint8_t t) | (no comment) | jschannel/JSDom.c:206 | static |
| static uint32_t Fixsz(uint8_t t) | (no comment) | jschannel/JSDom.c:207 | static |
| static uint64_t AttrAt(const uint8_t *b, uint64_t a, uint8_t *aid, uint8_t *tid, const uint8_t **v, uint32_t *vl) | attr at a: id, [name], type, value. Returns the byte after it. | jschannel/JSDom.c:213 | static |
| static int FindAttr(const uint8_t *b, const struct EdtBmlNode *nd, uint8_t want, uint8_t *tid, const uint8_t **v, uint32_t *vl) | (no comment) | jschannel/JSDom.c:221 | static |
| static int EncodeAttr(uint8_t aid, const uint8_t *s, uint32_t n, uint8_t *tid, uint8_t *out, uint32_t *on) | JS string -> attr value bytes for attr aid (picks a type the attr allows) | jschannel/JSDom.c:228 | static |
| static uint32_t DecodeAttr(uint8_t aid, uint8_t tid, const uint8_t *v, uint32_t vl, char *out, const uint8_t **sp) | (no comment) | jschannel/JSDom.c:262 | static |
| static void JbPut(struct Jb *b, const uint8_t *s, uint32_t n) | (no comment) | jschannel/JSDom.c:278 | static |
| static void TextOf(struct JSDom *d, const uint8_t *b, uint32_t idx, struct Jb *o) | (no comment) | jschannel/JSDom.c:290 | static |
| static int Ident(uint8_t c) | (no comment) | jschannel/JSDom.c:302 | static |
| static int ParseComp(const uint8_t *s, uint32_t n, uint32_t *i, struct Comp *c) | (no comment) | jschannel/JSDom.c:303 | static |
| static int HasToken(const uint8_t *v, uint32_t vl, const uint8_t *t, uint32_t tl) | (no comment) | jschannel/JSDom.c:317 | static |
| static int MatchComp(const uint8_t *b, const struct EdtBmlNode *nd, const struct Comp *c) | (no comment) | jschannel/JSDom.c:329 | static |
| static int MatchChain(struct JSDom *d, const uint8_t *b, uint32_t idx, const struct Comp *cs, uint32_t nc, uint64_t lo) | node idx matches the selector chain comps[0..nc) (descendant combinators), ancestors bounded by root_end/start | jschannel/JSDom.c:346 | static |
| static int Query(struct JSDom *d, uint32_t sp, uint32_t idx, const uint8_t *sel, uint32_t sn, uint32_t max) | QUERY: descendants of node idx (or the whole space if idx == ~0) in document order -> d->ql | jschannel/JSDom.c:359 | static |
| static int Detach(struct JSDom *d, uint32_t hi) | detach node (handle hi) from its space into a fresh fragment; its subtree handles move with it | jschannel/JSDom.c:390 | static |
| static int Attach(struct JSDom *d, uint32_t ci, uint32_t sp, uint64_t pos) | insert fragment root (handle ci) into the space of parent pi at pos; the fragment's handles move in | jschannel/JSDom.c:407 | static |
| static int SetAttr(struct JSDom *d, uint32_t hi, int aid, const uint8_t *val, uint32_t vl, int del) | (no comment) | jschannel/JSDom.c:420 | static |
| static int SetText(struct JSDom *d, uint32_t hi, const uint8_t *s, uint32_t n) | (no comment) | jschannel/JSDom.c:456 | static |
| static uint64_t Num(double x) | (no comment) | jschannel/JSDom.c:484 | static |
| static uint32_t Hid(const struct JSDom *d, uint32_t slot) | M5B: JS / API handle id = slot + gen * JSDOM_MAX_HANDLES | jschannel/JSDom.c:486 | static |
| static int Hdec(const struct JSDom *d, uint32_t id, uint32_t *slot) | (no comment) | jschannel/JSDom.c:487 | static |
| static uint64_t Numh(const struct JSDom *d, uint32_t slot) | (no comment) | jschannel/JSDom.c:494 | static |
| static void LsPurge(struct JSDom *d) | (no comment) | jschannel/JSDom.c:495 | static |
| static int ArgNum(uint32_t argc, const uint64_t *argv, uint32_t i, double *x) | (no comment) | jschannel/JSDom.c:500 | static |
| static int ArgH(struct JSDom *d, uint32_t argc, const uint64_t *argv, uint32_t i, uint32_t *h) | (no comment) | jschannel/JSDom.c:506 | static |
| static const uint8_t * ArgS(struct JscVM *vm, uint32_t argc, const uint64_t *argv, uint32_t i, uint32_t *n) | (no comment) | jschannel/JSDom.c:512 | static |
| static uint64_t RetH(struct JSDom *d, uint32_t sp, uint64_t off) | (no comment) | jschannel/JSDom.c:517 | static |
| static int IdxOfOp(struct JSDom *d, uint8_t op, uint32_t *idx) | (no comment) | jschannel/JSDom.c:518 | static |
| static int ChildOk(const struct EdtBmlNode *n) | (no comment) | jschannel/JSDom.c:525 | static |
| static int JsdomHost(void *ctx, struct JscVM *vm, uint32_t argc, const uint64_t *argv, uint64_t *out) | (no comment) | jschannel/JSDom.c:527 | static |
| struct JSDom * JSDomOpen(struct Channel *editor, uint64_t buf_id) | (no comment) | jschannel/JSDom.c:845 | public |
| void JSDomClose(struct JSDom *d) | (no comment) | jschannel/JSDom.c:858 | public |
| static void Put32N(uint8_t *p, uint32_t v) | (no comment) | jschannel/JSDom.c:866 | static |
| static uint32_t Get32N(const uint8_t *p) | (no comment) | jschannel/JSDom.c:867 | static |
| static int JSReq(struct JSDom *d, uint32_t op, const uint8_t *pl, uint32_t n, uint8_t *res, uint32_t rcap, uint32_t *rn) | one record to JSChannel, then drain: 0 = RESULT for req (payload copied to out), else -error code | jschannel/JSDom.c:869 | static |
| int JSDomRun(struct JSDom *d, const char *src, uint32_t n, char *out, uint32_t outcap, uint32_t *outlen) | (no comment) | jschannel/JSDom.c:891 | public |
| int JSDomPostEvent(struct JSDom *d, uint32_t chev, uint32_t node) | (no comment) | jschannel/JSDom.c:930 | public |
| int JSDomListening(const struct JSDom *d, uint32_t chev, uint32_t node) | (no comment) | jschannel/JSDom.c:941 | public |
| int JSDomPump(struct JSDom *d, char *out, uint32_t outcap, uint32_t *outlen) | JSCHANNEL-M5B: deliver queued events now (a two-statement script through the same COMPILE/RUN records) | jschannel/JSDom.c:949 | public |
| int JSDomDispatch(struct JSDom *d, uint32_t chev, uint32_t node, char *out, uint32_t outcap, uint32_t *outlen) | (no comment) | jschannel/JSDom.c:956 | public |
| uint32_t JSDomListenerCount(const struct JSDom *d) | (no comment) | jschannel/JSDom.c:961 | public |
| int JSDomNodeById(struct JSDom *d, const char *id) | (no comment) | jschannel/JSDom.c:962 | public |
| uint64_t JSDomVersion(const struct JSDom *d) | (no comment) | jschannel/JSDom.c:975 | public |
| uint64_t JSDomEdits(const struct JSDom *d) | (no comment) | jschannel/JSDom.c:976 | public |
| uint32_t JSDomLastStatus(const struct JSDom *d) | (no comment) | jschannel/JSDom.c:977 | public |
| int JSDomNodeAt(struct JSDom *d, uint64_t off) | JSCHANNEL-M6 BEGIN (2026-10-27, PROVISIONAL): page host helpers (jschannel/JSPage.c). JSDomNodeAt: the element a click at source byte off means. Same rule as ComposerPreviewClick: a text node gives | jschannel/JSDom.c:984 | public |
| int JSDomTick(struct JSDom *d, char *out, uint32_t outcap, uint32_t *outlen) | (no comment) | jschannel/JSDom.c:1006 | public |
| static uint64_t Ld64(const uint8_t *p) | (no comment) | jschannel/JSPage.c:43 | static |
| static uint32_t Ld32(const uint8_t *p) | (no comment) | jschannel/JSPage.c:44 | static |
| static void Plog(struct JSPage *p, const char *s, uint32_t n) | (no comment) | jschannel/JSPage.c:46 | static |
| static void Plogf(struct JSPage *p, const char *what, int rc) | (no comment) | jschannel/JSPage.c:55 | static |
| static uint32_t Ed(struct JSPage *p, uint32_t op, uint64_t pos, uint32_t del, const void *d, uint32_t dl, const uint8_t **pl, uint32_t *pn) | (no comment) | jschannel/JSPage.c:61 | static |
| static int Refresh(struct JSPage *p) | (no comment) | jschannel/JSPage.c:73 | static |
| static int StrTid(uint8_t t) | (no comment) | jschannel/JSPage.c:100 | static |
| static void PwOpen(void *u, uint8_t op, const uint8_t *nm, uint16_t nl, uint8_t na) | (no comment) | jschannel/JSPage.c:101 | static |
| static int Ieq(const uint8_t *v, uint32_t n, const char *s) | (no comment) | jschannel/JSPage.c:109 | static |
| static void PwAttr(void *u, uint8_t aid, const uint8_t *nm, uint16_t nl, uint8_t tid, const uint8_t *v, uint32_t vl) | (no comment) | jschannel/JSPage.c:116 | static |
| static void PwText(void *u, uint8_t op, const uint8_t *s, uint16_t n) | (no comment) | jschannel/JSPage.c:131 | static |
| static void PwDoc(void *u, const uint8_t *a, uint16_t la, const uint8_t *b, uint16_t lb, const uint8_t *c, uint16_t lc) | (no comment) | jschannel/JSPage.c:132 | static |
| static void PwClose(void *u, uint8_t op, uint8_t v) | (no comment) | jschannel/JSPage.c:134 | static |
| static void PwNop(void *u) | (no comment) | jschannel/JSPage.c:135 | static |
| static struct Pw * Walk(struct JSPage *p, const char *want_id) | (no comment) | jschannel/JSPage.c:136 | static |
| static void WalkFree(struct Pw *w) | (no comment) | jschannel/JSPage.c:150 | static |
| static char * InlineText(const struct JSPage *p, const struct Pw *w, uint32_t e, uint32_t *len) | inline script text: the TEXT / CDATA children of element e, concatenated (u16be length + bytes each) | jschannel/JSPage.c:153 | static |
| static int MentionsTimer(const char *s, uint32_t n) | (no comment) | jschannel/JSPage.c:170 | static |
| static int Run(struct JSPage *p, const char *src, uint32_t n) | (no comment) | jschannel/JSPage.c:177 | static |
| struct JSPage * JSPageOpen(const uint8_t *page, uint64_t n, const char *store_dir, JSPageFetchFn fetch, void *fetch_user) | (no comment) | jschannel/JSPage.c:186 | public |
| void JSPageClose(struct JSPage *p) | (no comment) | jschannel/JSPage.c:242 | public |
| const uint8_t * JSPageDoc(struct JSPage *p, uint64_t *n) | (no comment) | jschannel/JSPage.c:250 | public |
| uint64_t JSPageVersion(struct JSPage *p) | (no comment) | jschannel/JSPage.c:256 | public |
| int JSPageFocus(const struct JSPage *p) | (no comment) | jschannel/JSPage.c:257 | public |
| const char * JSPageLog(const struct JSPage *p) | (no comment) | jschannel/JSPage.c:258 | public |
| void JSPageGetStats(const struct JSPage *p, struct JSPageStats *s) | (no comment) | jschannel/JSPage.c:259 | public |
| int JSPageNodeById(struct JSPage *p, const char *id) | (no comment) | jschannel/JSPage.c:260 | public |
| static const char * EvName(uint32_t chev) | (no comment) | jschannel/JSPage.c:262 | static |
| static int Fire(struct JSPage *p, uint32_t chev, int node, const char *key) | queue chev for node, then one run that sets the global `event` and pumps the queue | jschannel/JSPage.c:269 | static |
| int JSPageEvent(struct JSPage *p, uint32_t chev, int node) | (no comment) | jschannel/JSPage.c:286 | public |
| int JSPageClick(struct JSPage *p, const struct BbLayout *lay, uint16_t x, uint16_t y) | (no comment) | jschannel/JSPage.c:287 | public |
| int JSPageKey(struct JSPage *p, uint32_t chev, const char *key) | (no comment) | jschannel/JSPage.c:305 | public |
| int JSPageTick(struct JSPage *p) | (no comment) | jschannel/JSPage.c:310 | public |
| int JSPageEval(struct JSPage *p, const char *src, char *out, uint32_t cap) | (no comment) | jschannel/JSPage.c:321 | public |
| int JSPageNodeXY(struct JSPage *p, const struct BbLayout *lay, const char *id, uint16_t *x, uint16_t *y) | a layout point inside element #id (first text run of it, else its box): for tests and scripted input | jschannel/JSPage.c:332 | public |