Méthode PickerBuilder.setOrigin
Définit l'origine de la boîte de dialogue de sélecteur. L'origine doit être définie sur window.location.protocol + '//' + window.location.host de la page supérieure, si votre application s'exécute dans un iFrame.
Signature
setOrigin(origin: string): PickerBuilder;
Détails
Facultatif |
Non |
Finale |
Non |
Protégée |
Non |
Statique |
Non |
Paramètres
Nom |
Type |
Facultatif |
Description |
origin |
string |
Non |
|
Renvoie
PickerBuilder
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/11/07 (UTC).
[null,null,["Dernière mise à jour le 2024/11/07 (UTC)."],[[["Sets the origin of the picker dialog, crucial for applications running in iframes to ensure proper functionality by specifying the top-most page's origin."],["The `setOrigin` method requires a single, mandatory parameter: `origin`, which is a string representing the desired origin."],["This method is not optional, final, protected, or static, offering flexibility in its implementation."],["Using this method returns a `PickerBuilder` instance, enabling further configuration of the picker dialog."]]],["The `setOrigin` function configures the origin of a picker dialog. It requires a string parameter, `origin`, which should be the protocol and host of the top-most page (e.g., `window.location.protocol + '//' + window.location.host`) when the application runs within an iframe. This function, part of the `PickerBuilder`, is not optional, final, protected, or static, and returns a `PickerBuilder` object.\n"]]