mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-24 09:33:44 +03:00
Release v0.2.0
This commit is contained in:
parent
9d26d9b426
commit
d385589d3a
5413
demo/rebilly.json
Normal file
5413
demo/rebilly.json
Normal file
File diff suppressed because it is too large
Load Diff
35
dist/redoc.full.js
vendored
35
dist/redoc.full.js
vendored
|
@ -8178,21 +8178,39 @@ $__System.register('1a', ['2', '3', '4', '5', '6', '7', '8', '10', '12', '13', '
|
||||||
throw error;
|
throw error;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: 'autoInit',
|
||||||
|
value: function autoInit() {
|
||||||
|
var specUrlAttributeName = 'spec-url';
|
||||||
|
var dom = new BrowserDomAdapter();
|
||||||
|
var redocEl = dom.query('redoc');
|
||||||
|
if (!redocEl) return;
|
||||||
|
if (dom.hasAttribute(redocEl, specUrlAttributeName)) {
|
||||||
|
var url = dom.getAttribute(redocEl, specUrlAttributeName);
|
||||||
|
Redoc.init(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'dispose',
|
key: 'dispose',
|
||||||
value: function dispose() {
|
value: function dispose() {
|
||||||
var dom = new BrowserDomAdapter();
|
var dom = new BrowserDomAdapter();
|
||||||
var el = dom.query('redoc');
|
var el = dom.query('redoc');
|
||||||
var parent = el.parentElement;
|
var parent = undefined;
|
||||||
var nextSibling = el.nextElementSibling;
|
var nextSibling = undefined;
|
||||||
|
if (el) {
|
||||||
|
parent = el.parentElement;
|
||||||
|
nextSibling = el.nextElementSibling;
|
||||||
|
}
|
||||||
|
|
||||||
Redoc.appRef && Redoc.appRef.dispose();
|
if (Redoc.appRef) {
|
||||||
Redoc.appRef = null;
|
Redoc.appRef.dispose();
|
||||||
|
Redoc.appRef = null;
|
||||||
|
|
||||||
// Redoc dispose removes host element, so need to restore it
|
// Redoc dispose removes host element, so need to restore it
|
||||||
el = dom.createElement('redoc');
|
el = dom.createElement('redoc');
|
||||||
el.innerText = 'Loading...';
|
el.innerText = 'Loading...';
|
||||||
parent.insertBefore(el, nextSibling);
|
parent && parent.insertBefore(el, nextSibling);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
@ -55466,6 +55484,7 @@ $__System.register('1', ['14', '1a9'], function (_export) {
|
||||||
|
|
||||||
window.Redoc = Redoc;
|
window.Redoc = Redoc;
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
|
Redoc.autoInit();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
2
dist/redoc.full.js.map
vendored
2
dist/redoc.full.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/redoc.full.min.js
vendored
4
dist/redoc.full.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/redoc.full.min.js.map
vendored
2
dist/redoc.full.min.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user