Skip to content

Commit b0a5cf1

Browse files
committed
remove UrlUtils
1 parent 242736b commit b0a5cf1

File tree

5 files changed

+6
-346
lines changed

5 files changed

+6
-346
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,7 @@ class Component {
22482248
this.processRerender(html, backendResponse);
22492249
const liveUrl = await backendResponse.getLiveUrl();
22502250
if (liveUrl) {
2251-
HistoryStrategy.replace(new UrlUtils(liveUrl + window.location.hash, window.location.origin));
2251+
history.replaceState(history.state, '', new URL(liveUrl + window.location.hash, window.location.origin));
22522252
}
22532253
this.backendRequest = null;
22542254
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 & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)