MCPcopy Create free account
hub / github.com/neomjs/neo / construct

Method construct

docs/app/view/classdetails/TutorialComponent.mjs:43–57  ·  view source on GitHub ↗

* * @param {Object} config

(config)

Source from the content-addressed store, hash-verified

41 * @param {Object} config
42 */
43 construct(config) {
44 super.construct(config);
45
46 let me = this,
47 isJson = me.fileType === 'json',
48 url = '../../docs/tutorials/' + me.fileName;
49
50 Neo.Xhr[isJson ? 'promiseJson' : 'promiseRequest']({
51 url
52 }).then(data => {
53 me.timeout(100).then(() => { // ensure we are not mounting
54 me.applySourceCode(isJson ? data.json : data.response)
55 })
56 })
57 }
58
59 /**
60 *

Callers

nothing calls this directly

Calls 2

timeoutMethod · 0.80
applySourceCodeMethod · 0.45

Tested by

no test coverage detected