Skip to content

Commit e0d83d7

Browse files
committed
remove UrlUtils
1 parent 05c9428 commit e0d83d7

File tree

5 files changed

+6
-347
lines changed

5 files changed

+6
-347
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ class Component {
22572257
this.processRerender(html, backendResponse);
22582258
const liveUrl = await backendResponse.getLiveUrl();
22592259
if (liveUrl) {
2260-
HistoryStrategy.replace(new UrlUtils(liveUrl + window.location.hash, window.location.origin));
2260+
history.replaceState(history.state, '', new URL(liveUrl + window.location.hash, window.location.origin));
22612261
}
22622262
this.backendRequest = null;
22632263
thisPromiseResolve(backendResponse);

src/LiveComponent/assets/dist/url_utils.d.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/LiveComponent/assets/src/Component/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import HookManager from '../HookManager';
77
import { executeMorphdom } from '../morphdom';
88
import ExternalMutationTracker from '../Rendering/ExternalMutationTracker';
99
import { normalizeModelName } from '../string_utils';
10-
import { HistoryStrategy, UrlUtils } from "../url_utils";
1110
import type { ElementDriver } from './ElementDriver';
1211
import type { PluginInterface } from './plugins/PluginInterface';
1312
import UnsyncedInputsTracker from './UnsyncedInputsTracker';
@@ -331,7 +330,11 @@ export default class Component {
331330
this.processRerender(html, backendResponse);
332331
const liveUrl = await backendResponse.getLiveUrl();
333332
if (liveUrl) {
334-
HistoryStrategy.replace(new UrlUtils(liveUrl + window.location.hash, window.location.origin));
333+
history.replaceState(
334+
history.state,
335+
'',
336+
new URL(liveUrl + window.location.hash, window.location.origin)
337+
);
335338
}
336339

337340
// finally resolve this promise

src/LiveComponent/assets/src/url_utils.ts

Lines changed: 0 additions & 172 deletions
This file was deleted.

src/LiveComponent/assets/test/url_utils.test.ts

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)