Skip to content

Commit

Permalink
Set isSW to false and add documentation on wbInfo
Browse files Browse the repository at this point in the history
See
webrecorder/wombat#155 (comment)
for details about why we need to set isSW to false
  • Loading branch information
benoit74 committed Nov 14, 2024
1 parent 20bf43f commit 6ae8010
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions javascript/src/wombatSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,21 @@ export function getWombatInfo(
// The host of the original url
wombat_host: orig_host,

// Extra options ?
wombat_opts: {},
// We are not running inside a service worker, wombat needs to know about it since
// some "magic" URLs like blobs are not available
isSW: false,

// ?
enable_auto_fetch: true,
// Convert all post request to get request
convert_post_to_get: true,

// Not used, we are not replaying in a frame
target_frame: '___wb_replay_top_frame',
isSW: true,

// Not used, we are not running in live mode
enable_auto_fetch: false,

// Extra options, not used
wombat_opts: {},
};
}

Expand Down
2 changes: 1 addition & 1 deletion javascript/test/wombatSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test('nominalWbInfo', (t) => {
t.is(wmInfo.coll, '');
t.is(wmInfo.convert_post_to_get, true);
t.is(wmInfo.enable_auto_fetch, true);
t.is(wmInfo.isSW, true);
t.is(wmInfo.isSW, false);
t.is(wmInfo.is_framed, false);
t.is(wmInfo.is_live, false);
t.is(wmInfo.mod, '');
Expand Down

0 comments on commit 6ae8010

Please sign in to comment.