Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B2PDE-1447 implements getAppDomain #199

Merged
merged 9 commits into from
Feb 13, 2025
Merged

B2PDE-1447 implements getAppDomain #199

merged 9 commits into from
Feb 13, 2025

Conversation

carlossgcia
Copy link
Contributor

@carlossgcia carlossgcia commented Feb 7, 2025

This PR introduces the getAppDomain function, which allows retrieving the domain of the application where the WebView bridge is running. This functionality is useful for identifying the application context and adjusting specific behaviors based on the domain.

closes #195

@carlossgcia carlossgcia marked this pull request as ready for review February 7, 2025 09:48
@carlossgcia carlossgcia force-pushed the B2PDE-1447-getAppDomain branch from 4f566b6 to 3753b51 Compare February 7, 2025 10:14
```ts
getAppDomain: () => Promise<{domain: string}>;
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `domain`: the domain value of the environment that the app is pointing to.

type: 'GET_APP_DOMAIN',
id: msg.id,
payload: {
appDomain: '123',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we expect an URL IMHO I would use https://example.com if there is any string user ANY_STRING

Suggested change
appDomain: '123',
appDomain: 'https://example.com',

Copy link
Contributor

@atabel atabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember to export the new method in index.ts
https://github.com/Telefonica/webview-bridge/blob/master/index.ts#L28

@carlossgcia carlossgcia requested a review from atabel February 13, 2025 13:01
@atabel atabel enabled auto-merge (squash) February 13, 2025 14:11
@atabel atabel disabled auto-merge February 13, 2025 14:13
@atabel atabel merged commit 0593c41 into master Feb 13, 2025
2 checks passed
@atabel atabel deleted the B2PDE-1447-getAppDomain branch February 13, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New method to get the novum app domain
5 participants