From 9a53a29b1f421cdea190b6175dec437ec6d76a39 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:41:21 -0800 Subject: feat: allow integrator to disable pushstate logic --- packages/instant/public/index.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/instant/public/index.html') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 253cbb194..79edb6c17 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -128,8 +128,10 @@ availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined, defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'), affiliateInfo: affiliateInfoOverride, + } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); + window.onpopstate = () => console.log('Integrators onpopstate called'); zeroExInstant.render(renderOptions); -- cgit v1.2.3 From 6e2fbcdb3e17e328fc76411b352b2385838eaa3a Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:58:41 -0800 Subject: feat: add URL override param --- packages/instant/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/instant/public/index.html') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 79edb6c17..039f8b781 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -128,7 +128,7 @@ availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined, defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'), affiliateInfo: affiliateInfoOverride, - + shouldDisablePushToHistory: !!queryParams.getQueryParamValue('shouldDisablePushToHistory'), } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); window.onpopstate = () => console.log('Integrators onpopstate called'); -- cgit v1.2.3 From 9384c507ac29043d0d2f68bef3dde94a43282d09 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 16:33:02 -0800 Subject: feat: add isInstantRendered check to safeguard against double renders and double removes --- packages/instant/public/index.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/instant/public/index.html') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 039f8b781..557cfa3dc 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -27,6 +27,10 @@
+ + + - + .button { + margin: 10px; + } - -
- - + + + + +
+
+
+ + + +
+
+
+ + + -- cgit v1.2.3 From b494a4a4dba6c781667b690f38387f03a22fe141 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 21 Nov 2018 11:55:32 -0500 Subject: chore: clean up index.umd.ts a bit --- packages/instant/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/instant/public/index.html') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 8f11502e4..df39994ef 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -64,7 +64,7 @@ window.history.pushState({ page: 1 }, '0x Instant'); window.history.pushState({ page: 2 }, '0x Instant'); window.history.pushState({ page: 3 }, '0x Instant'); - window.onpopstate = () => console.log('Integrators onpopstate called'); + window.onpopstate = () => console.log("Integrator's onpopstate called"); const removeUndefined = obj => { for (let k in obj) if (obj[k] === undefined) delete obj[k]; -- cgit v1.2.3