fix: output console.logs as user types (DOM)
Any console.logs inside script tags will be written to the fcc console as the user types. DOM challenges only. Also, DRYed out the main and test frame creation.
This commit is contained in:
committed by
mrugesh
parent
6acab90cb6
commit
29641986ab
@@ -159,10 +159,13 @@ export function buildBackendChallenge({ url }) {
|
||||
};
|
||||
}
|
||||
|
||||
export function updatePreview(buildData, document) {
|
||||
export async function updatePreview(buildData, document, proxyLogger) {
|
||||
const { challengeType } = buildData;
|
||||
|
||||
if (challengeType === challengeTypes.html) {
|
||||
createMainFramer(document)(buildData);
|
||||
await new Promise(resolve =>
|
||||
createMainFramer(document, resolve, proxyLogger)(buildData)
|
||||
);
|
||||
} else {
|
||||
throw new Error(`Cannot show preview for challenge type ${challengeType}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user