filesite
1 year ago
8 changed files with 48 additions and 6 deletions
@ -0,0 +1,22 @@ |
|||||||
|
import { ClientPlugin } from '@ulixee/hero-plugin-utils'; |
||||||
|
|
||||||
|
class ClientLogPlugin extends ClientPlugin { |
||||||
|
|
||||||
|
async onHero(hero, sendToCore) { |
||||||
|
const logTime = Date.now(); |
||||||
|
console.log('%s - New Hero is initialized, session id %s.', logTime, await hero.sessionId); |
||||||
|
} |
||||||
|
|
||||||
|
async onTab(hero, tab, sendToCore) { |
||||||
|
const logTime = Date.now(); |
||||||
|
console.log('%s - New Tab is initialized, id %s.', logTime, await tab.tabId); |
||||||
|
} |
||||||
|
|
||||||
|
async onFrameEnvironment(hero, frameEnvironment, sendToCore) { |
||||||
|
const logTime = Date.now(); |
||||||
|
console.log('%s - New FrameEnvironment is initialized.', logTime); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
export default ClientLogPlugin; |
Loading…
Reference in new issue