Extensible Modules for JavaScript - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Poster Communications Year : 2016

Extensible Modules for JavaScript

Abstract

The module pattern in JavaScript is commonly used to encapsulate definitions by using closures. However, closures prevent module definitions from being extended at runtime. We propose a simple pattern that not only opens the module, but allows one to extend the module definitions in layers. The pattern leverages the with construct and the prototype delegation mechanism of JavaScript to mimick dynamic binding, while minimizing the changes made to the module code.
No file

Dates and versions

hal-01407340 , version 1 (01-12-2016)

Identifiers

Cite

Florent Marchand de Kerchove, Jacques Noyé, Mario Südholt. Extensible Modules for JavaScript. ACM Press. SAC '16 - 31st Annual ACM Symposium on Applied Computing, Apr 2016, Pisa, Italy. , Proceedings of the 31st Annual ACM Symposium on Applied Computing, pp.3, 2016, ⟨10.1145/2851613.2851958⟩. ⟨hal-01407340⟩
276 View
0 Download

Altmetric

Share

Gmail Mastodon Facebook X LinkedIn More