source of https://micro-app.github.io.
Collection some information from the referrer page and save in window.name
.
let referrer = {};
try {
referrer = JSON.parse(decodeURIComponent(window.name.replace(/^micro-app=/, '')));
} catch (e) {
/* some code */
}
referrer.app : Object
Collection the app information.
Base64 icon will not be saved in referrer.app.icon
.
- referrer.app.name : String
- referrer.app.link : Url
- referrer.app.icon : Url
referrer.type : String
The applicationCache event type which is triggered.
referrer.version : String
The version of referrer page.
referrer.timeStamp : Number
The moment at the referrer page prepare to redirect.
referrer.lastUpdate : Number
The lastUpdate timeStamp of referrer page.
referrer.timing : Object
The performance.timing
of referrer page.
MIT