@liquidcommerce/elements-sdk 2.3.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,279 @@
1
+ # Browser Support
2
+
3
+ The LiquidCommerce Elements SDK supports all modern browsers from 2018 onward.
4
+
5
+ ## Minimum Supported Versions
6
+
7
+ | Browser | Minimum Version | Released |
8
+ |---------|----------------|----------|
9
+ | Chrome | 66+ | April 2018 |
10
+ | Firefox | 60+ | May 2018 |
11
+ | Safari | 12+ | September 2018 |
12
+ | Edge | 79+ (Chromium) | January 2020 |
13
+ | Samsung Internet | 7.2+ | June 2018 |
14
+
15
+ ## How We Achieve Compatibility
16
+
17
+ ### Polyfills
18
+
19
+ The SDK includes polyfills for the following DOM methods to ensure compatibility with older browsers:
20
+
21
+ - `Element.prototype.replaceChildren` - Replace all children of an element
22
+ - `Element.prototype.prepend` - Insert nodes before first child
23
+ - `Element.prototype.remove` - Remove element from DOM
24
+ - `Element.prototype.replaceWith` - Replace element with other nodes
25
+ - `Element.prototype.before` - Insert nodes before element
26
+ - `Element.prototype.after` - Insert nodes after element
27
+ - `Object.fromEntries` - Create object from key-value pairs
28
+
29
+ **Implementation:** `src/utils/dom-polyfills.ts`
30
+
31
+ ### Transpilation
32
+
33
+ The SDK is transpiled to ES2018 via Rollup and Babel, ensuring:
34
+ - Modern syntax compatibility
35
+ - Promise/async-await support
36
+ - Arrow functions and spread operators
37
+ - Template literals and destructuring
38
+
39
+ **Build target:** `es2018` (configured in `rollup.config.mjs`)
40
+
41
+ ## Testing Recommendations
42
+
43
+ ### Required Testing
44
+
45
+ Test your integration on:
46
+ - ✅ Chrome (latest stable)
47
+ - ✅ Firefox (latest stable)
48
+ - ✅ Safari (latest stable)
49
+ - ✅ Mobile Safari (iOS 12+)
50
+ - ✅ Chrome for Android
51
+
52
+ ### Optional Testing
53
+
54
+ For broader coverage:
55
+ - Samsung Internet (Android)
56
+ - Edge (Chromium)
57
+
58
+ ## Mobile Support
59
+
60
+ The SDK is fully responsive and optimized for mobile devices:
61
+ - Touch-optimized UI components
62
+ - Viewport-aware layouts
63
+ - Mobile payment methods (Apple Pay, Google Pay)
64
+ - Native mobile browser support
65
+
66
+ ## Progressive Web Apps (PWA)
67
+
68
+ The SDK works seamlessly in PWAs:
69
+ - Service Worker compatible
70
+ - Offline state handling
71
+ - LocalStorage for cart persistence
72
+ - Mobile-first design
73
+
74
+ ## Known Limitations
75
+
76
+ ### Internet Explorer
77
+
78
+ **Not supported.** Internet Explorer 11 and below are not compatible due to:
79
+ - Lack of ES6+ support
80
+ - Missing modern DOM APIs
81
+ - Security vulnerabilities
82
+
83
+ **Recommendation:** Show upgrade prompt for IE users.
84
+
85
+ ### Safari < 12
86
+
87
+ Safari versions before 12 have limited support:
88
+ - Some polyfills may not work
89
+ - Payment features may be restricted
90
+ - Consider showing upgrade prompt
91
+
92
+ ## Feature Detection
93
+
94
+ The SDK automatically detects browser capabilities:
95
+
96
+ ```javascript
97
+ // Automatic feature detection
98
+ if ('IntersectionObserver' in window) {
99
+ // Use lazy loading
100
+ } else {
101
+ // Fallback: load immediately
102
+ }
103
+
104
+ if ('localStorage' in window) {
105
+ // Persist cart data
106
+ } else {
107
+ // Use session-only cart
108
+ }
109
+ ```
110
+
111
+ ## Browser-Specific Notes
112
+
113
+ ### Chrome
114
+
115
+ - ✅ Full feature support
116
+ - ✅ Optimal performance
117
+ - ✅ Payment Request API
118
+
119
+ ### Firefox
120
+
121
+ - ✅ Full feature support
122
+ - ⚠️ Slightly different rendering
123
+ - ✅ All payment methods
124
+
125
+ ### Safari
126
+
127
+ - ✅ Full feature support
128
+ - ⚠️ Stricter CORS policies
129
+ - ✅ Apple Pay integration
130
+ - ⚠️ LocalStorage limits (5MB)
131
+
132
+ ### Edge (Chromium)
133
+
134
+ - ✅ Full feature support
135
+ - ✅ Same as Chrome (Chromium-based)
136
+
137
+ ### Samsung Internet
138
+
139
+ - ✅ Full feature support
140
+ - ✅ Android optimization
141
+ - ⚠️ Custom payment flows
142
+
143
+ ## Detailed Version Support by Year
144
+
145
+ ## 2018
146
+
147
+ ### Chrome
148
+ - Chrome 64, 65, 66, 67, 68, 69, 70, 71
149
+
150
+ ### Safari
151
+ - Safari 11.1, 12
152
+
153
+ ### Firefox
154
+ - Firefox 58, 59, 60, 61, 62, 63, 64
155
+
156
+ ### Samsung Internet
157
+ - Samsung Internet 7.2, 7.4, 8.2
158
+
159
+ ### Edge
160
+ - Not supported (Edge Legacy only)
161
+
162
+ ## 2019
163
+
164
+ ### Chrome
165
+ - Chrome 72, 73, 74, 75, 76, 77, 78, 79
166
+
167
+ ### Safari
168
+ - Safari 12.1, 13
169
+
170
+ ### Firefox
171
+ - Firefox 65, 66, 67, 68, 69, 70, 71
172
+
173
+ ### Samsung Internet
174
+ - Samsung Internet 9.0, 9.2, 10.1
175
+
176
+ ### Edge
177
+ - Not supported (Edge Legacy only)
178
+
179
+ ## 2020
180
+
181
+ ### Chrome
182
+ - Chrome 80, 81, 83, 84, 85, 86, 87
183
+
184
+ ### Safari
185
+ - Safari 13.1, 14
186
+
187
+ ### Firefox
188
+ - Firefox 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84
189
+
190
+ ### Samsung Internet
191
+ - Samsung Internet 11.1, 11.2, 12.0
192
+
193
+ ### Edge
194
+ - Edge 79, 80, 81, 83, 84, 85, 86, 87 (Chromium-based starts)
195
+
196
+ ## 2021
197
+
198
+ ### Chrome
199
+ - Chrome 88, 89, 90, 91, 92, 93, 94, 95, 96
200
+
201
+ ### Safari
202
+ - Safari 14.1, 15
203
+
204
+ ### Firefox
205
+ - Firefox 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
206
+
207
+ ### Samsung Internet
208
+ - Samsung Internet 13.0, 13.2, 14.0, 14.2
209
+
210
+ ### Edge
211
+ - Edge 88, 89, 90, 91, 92, 93, 94, 95, 96
212
+
213
+ ## 2022
214
+
215
+ ### Chrome
216
+ - Chrome 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108
217
+
218
+ ### Safari
219
+ - Safari 15.4, 16
220
+
221
+ ### Firefox
222
+ - Firefox 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108
223
+
224
+ ### Samsung Internet
225
+ - Samsung Internet 15.0, 16.0, 17.0, 18.0
226
+
227
+ ### Edge
228
+ - Edge 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108
229
+
230
+ ## 2023
231
+
232
+ ### Chrome
233
+ - Chrome 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120
234
+
235
+ ### Safari
236
+ - Safari 16.4, 17
237
+
238
+ ### Firefox
239
+ - Firefox 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121
240
+
241
+ ### Samsung Internet
242
+ - Samsung Internet 19.0, 20.0, 21.0, 22.0
243
+
244
+ ### Edge
245
+ - Edge 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120
246
+
247
+ ## 2024
248
+
249
+ ### Chrome
250
+ - Chrome 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132
251
+
252
+ ### Safari
253
+ - Safari 17.4, 18, 18.2
254
+
255
+ ### Firefox
256
+ - Firefox 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133
257
+
258
+ ### Samsung Internet
259
+ - Samsung Internet 23.0, 24.0, 25.0, 26.0
260
+
261
+ ### Edge
262
+ - Edge 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131
263
+
264
+ ## 2025
265
+
266
+ ### Chrome
267
+ - Chrome 133, 134
268
+
269
+ ### Safari
270
+ - Safari 19 (expected)
271
+
272
+ ### Firefox
273
+ - Firefox 134, 135
274
+
275
+ ### Samsung Internet
276
+ - Samsung Internet 27.0 (expected)
277
+
278
+ ### Edge
279
+ - Edge 132, 133