Skip to content

Commit

Permalink
Add target to <base> so links will open on top level
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-skl committed Sep 27, 2024
1 parent 2b0e11b commit b68aee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/websandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class Websandbox {

if (options.baseUrl) {
frameContent = frameContent
.replace('<head>', `<head>\n<base href="${options.baseUrl}"/>`);
.replace('<head>', `<head>\n<base target="_parent" href="${options.baseUrl}"/>`);
}

return frameContent;
Expand Down

0 comments on commit b68aee1

Please sign in to comment.