MCPcopy Create free account
hub / github.com/dabbott/javascript-playgrounds / componentDidMount

Method componentDidMount

components/player/Sandbox.js:62–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 }
61
62 componentDidMount() {
63 window.onmessage = (e) => {
64 this.runApplication(e.data)
65 }
66
67 window.onerror = (message, source, line) => {
68 line -= prefixLineCount
69 this.throwError(`${message} (${line})`)
70 return true
71 }
72
73 parent.postMessage(JSON.stringify({
74 id: this.props.id,
75 type: 'ready',
76 }), '*')
77 }
78
79 buildErrorMessage(e) {
80 let message = `${e.name}: ${e.message}`

Callers

nothing calls this directly

Calls 2

throwErrorMethod · 0.80
runApplicationMethod · 0.45

Tested by

no test coverage detected