Repository navigation
v2.0.0-beta.0
Pre-release
Pre-release
Breaking
- introduce new type param to
ProcessingFunction{,Async}, which defines the type of content being processed (eitherDocumentorDocumentFragment) - The
ProcessingFunctionandProcessingFunctionAsynctypes are now context-less function types. This means when sending a function in for yourinstructionsargument, it must not have athiscontext. The recommended way to enforce this is to use arrow() => {}syntax:This change is breaking if your code usesnew Processor<T, U>(template, (frag: DocumentFragment, data: T, opts: U): void => { //... })
thisinside a function and expects it to be called with athiscontext.
New Features
- static
.process()and.processAsync()param@fragtakes aDocumenttype in addition toDocumentFragment