Meta tags:
description= A promise-based JavaScript library for building single-page web applications from reusable components, called gadgets.;
keywords= javascript, asynchronous;
Headings (most frequently used words):
gadget, definition, api, concepts, installing, getting, started, quickguide, contributing, howto, guideline, faq, license, examples, loading,
Text of the page (most frequently used words):
the (38), renderjs (16), and (13), gadget (13), use (10), promise (10), not (9), for (7), #definition (7), method (6), code (6), this (6), rsvp (6), html (6), all (5), nexedi (5), promises (5), callback (4), only (4), url (4), javascript (4), script (4), officejs (3), based (3), see (3), with (3), more (3), instance (3), ready (3), methods (3), writing (3), also (3), handling (3), you (3), but (3), time (3), specifications (3), defined (3), head (3), body (3), applications (3), app (2), are (2), jio (2), check (2), examples (2), under (2), later (2), what (2), browsers (2), compatible (2), never (2), then (2), dom (2), execution (2), click (2), here (2), context (2), when (2), dependencies (2), explanation (2), api (2), list (2), reusable (2), gadgets (2), between (2), new (2), should (2), queue (2), implementation (2), easy (2), understand (2), such (2), started (2), which (2), cancel (2), into (2), read (2), first (2), version (2), loads (2), css (2), src (2), minimal (2), interface (2), single (2), used (2), existing (2), legal, mention, 沪icp备14008524号, copyright, 2001, 2026, rights, reserved, office, productivity, store, chat, client, task, managers, various, editors, most, front, end, solutions, created, ideas, inspiration, out, following, licensed, terms, rationale, please, licensing, gnu, gpl, free, software, license, does, support, faq, json, arguments, call, changestate, external, prototype, global, variables, attribute, your, always, returned, value, guideline, how, prevent, concurrency, mutex, howto, source, available, mirror, github, gitlab, contributing, triggered, automatically, have, loaded, rjs, window, handler, return, they, chainable, below, provided, followed, detailed, sections, quickguide, webapp, understanding, navigation, having, project, providing, feedback, errors, tests, etc, achieve, follow, learning, track, added, kind, allow, cancelling, chains, instead, push, xmlhttprequest, ajax, addeventlistener, loopeventlistener, settimeout, delay, our, simple, from, discussion, even, internally, nobody, gives, same, semantics, now, chrome, native, other, implementations, repo, cross, patched, implement, allows, manually, interrupt, part, will, integrated, object, probably, again, missing, point, goal, make, readable, maintainable, callbacks, everywhere, often, leads, difficult, maintainance, has, been, decided, rely, design, pattern, write, thing, asynchronous, event, getting, custom, latest, files, directly, download, set, get, working, installing, generates, class, declarejob, declaremethod, keep, copy, clone, every, fetches, parse, loading, example, can, contain, link, acts, documentation, referenced, document, consists, file, its, header, concepts, developed, maintained, reduce, duplication, basis, stores, erp5, library, create, html5, components, called, page, web, quickly, integrate, 3rd, party, libraries, apps, chain, home,
Text of the page (random words):
renderjs home renderjs javascript apps on a chain renderjs is a javascript library used to create reusable html5 components called gadgets for single page web applications it is also used to quickly integrate existing 3rd party libraries into existing applications it is developed and maintained by nexedi to reduce the code duplication between the erp5 interface and as a basis for applications in app stores such as officejs concepts gadget definition the definition of a renderjs gadget consists of a single html file and its js css dependencies defined in the dom header this definition is referenced by the url of the html document html can also contain a link to the gadget interface url which acts a documentation minimal example html head script src rsvp js script script src renderjs js script head body a minimal renderjs gadget body html gadget definition loading when renderjs loads a new definition url it fetches the html and parse it keep a copy of the body to clone it on every instance loads all js css defined in the head generates the class methods defined by declaremethod and declarejob click here to see more installing renderjs is easy to set up and get working download the files directly renderjs latest version rsvp js custom version getting started the first thing is to understand the asynchronous event handling in javascript as writing code with callbacks everywhere often leads to difficult maintainance it has been decided to only rely on the promises a design pattern to write javascript code in nexedi the goal of promise is only to make the code readable and maintainable if you read the promises a specifications for the first time probably you re missing the point of promises so read again we started to use rsvp as cross browsers compatible promise s implementation we patched it to implement a cancel method on the promise object which allows to manually interrupt a promise execution this cancel method is not part of the promises a specifications and so will not be integrated into rsvp such method is from time to time under discussion on the promises a repo on other promise implementations or even internally for chrome native promise nobody gives it the same semantics specifications for now our implementation is simple and easy to understand code based on renderjs should be promise based do not use settimeout by rsvp delay do not use addeventlistener but loopeventlistener do not use xmlhttprequest but jio ajax we added a new kind of promise in rsvp queue to allow cancelling a list of promise chains you should only use queue and never use the then method but the push method instead writing a webapp is not only understanding renderjs it s also handling url navigation having reusable gadgets between project providing feedback in the ui handling errors writing tests etc to achieve this follow the officejs learning track api quickguide below is a list of all methods provided by renderjs followed by a more detailed explanation in later sections gadget s definition api all methods return the gadget definition and so they are chainable callback this context is the gadget instance do what do this explanation ready handler rjs window ready callback the ready callback is triggered automatically when all gadget dependencies have loaded callback this context is the gadget instance click here to see more contributing the renderjs source code is available on gitlab with a mirror on github howto how to prevent concurrency execution with a mutex guideline always check the returned value of a method do not use dom id attribute in your gadget do not use global variables in a gadget do not use promise prototype then never call changestate of an external gadget use json compatible arguments faq what browsers does renderjs support license renderjs is free software licensed under the terms of the gnu gpl v3 or later for rationale please see nexedi licensing examples most of the front end solutions created by nexedi are based on renderjs and jio for ideas and inspiration check out the following examples officejs office productivity app store chat client task managers various editors nexedi sa copyright c 2001 2026 all rights reserved 沪icp备14008524号 legal mention
|