Methode PickerBuilder.setOrigin
Hiermit wird die Quelle des Auswahldialogfelds festgelegt. Wenn Ihre Anwendung in einem iFrame ausgeführt wird, sollte der Ursprung auf window.location.protocol + '//' + window.location.host der obersten Seite festgelegt sein.
Unterschrift
setOrigin(origin: string): PickerBuilder;
Details
Optional |
Nein |
Finale |
Nein |
Geschützt |
Nein |
Statisch |
Nein |
Parameter
Name |
Typ |
Optional |
Beschreibung |
origin |
string |
Nein |
|
Gibt Folgendes zurück:
PickerBuilder
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-11-07 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]