You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/integration.ts
+63Lines changed: 63 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,69 @@ export function pathIntegration() {
160
160
);
161
161
}
162
162
163
+
/**
164
+
* If your SolidStart "app" is really just a "widget" or "micro-frontend" that will be embedded into a larger app,
165
+
* you can use this router integration to embed your entire url into a *single* search parameter.
166
+
*
167
+
* This is done by taking your "app"s normal url, and passing it through `encodeURIComponent` and `decodeURIComponent`.
168
+
*
169
+
* If your widget has search params, they will not leak into the parent/host app, and your solid app should not pickup parents search params, unless your Solid code is reading from `window.location`.
170
+
*/
171
+
// This implementation was based on pathIntegration, with many ideas and concepts taken from hashIntegration.
172
+
exportfunctionsearchParamIntegration(
173
+
/**
174
+
* Let's say you are building a chat widget that will be integrated into a larger app.
175
+
*
176
+
* You want to pass in a globally unique search param key here, perhaps "supportChatWidgetUrl"
0 commit comments