Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 505 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 505 Bytes

Override Marko Core Tag

This is an example of overriding the Marko core await tag to enforce a default timeout if the user did not specify a timeout.

Installation

npm install marko-js-samples/override-core-tag --save

Usage

$ var personPromise = new Promise((resolve, reject) => {
    setTimeout(function() {
        resolve({
            name: 'Frank'
        });
    }, 15000);
});

<await(person from personPromise)>
    <div>Hello ${person.name}!</div>
</await>