Commit ee9699e
feat: add allow="payment" attribute to embed iframes for Apple Pay/Google Pay support (calcom#22446)
* feat: add allow="payment" attribute to embed iframes for Apple Pay support
- Add default allow="payment" attribute to all embed iframes
- Add test cases to verify payment attribute is set by default
- Fixes Apple Pay functionality in Cal.com embeds
Fixes calcom#19347
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* test: add comprehensive tests for iframe attribute handling
- Add test for when no config is provided
- Add test for empty iframeAttrs object
- Add test to verify all attributes are applied (not just id)
- Ensure allow='payment' is set in all scenarios
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: restrict iframeAttrs to only allow id attribute
- Changed implementation to only apply 'id' from iframeAttrs
- Made allow='payment' non-configurable and always set
- Updated tests to reflect new behavior
- Keeps API surface low and avoids adding support for attributes
unless explicitly required as a feature
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: remove duplicate test case
- Removed duplicate test for no config scenario
- Kept the more descriptive test case
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7813d37 commit ee9699e
2 files changed
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
261 | 311 | | |
262 | 312 | | |
263 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
| |||
0 commit comments