Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Specifies an additional domain that Office should trust, in addition to the one specified in the SourceLocation element. Specifying a domain has these effects:
- It enables pages, routes, or other resources in the domain to be opened directly in the root task pane of the add-in on desktop Office platforms. (Specifying a domain in an <AppDomain> isn't necessary for Office on the web or to open a resource in an IFrame, nor it is necessary for opening a resource in a dialog opened with the Dialog API.)
- It enables pages in the domain to make Office.js API calls from IFrames within the add-in.
Add-in type: Content, Task pane, Mail
Syntax
<AppDomain>string</AppDomain>
Important
- The value of the <AppDomain> element must include the protocol (for example,
<AppDomain>https://myappdomain.com</AppDomain>), and the protocol must be eitherhttporhttps. - If there is an explicit port for the domain, include it (for example,
<AppDomain>https://myappdomain.com:9999</AppDomain>). - If a subdomain needs to be trusted, include it (for example,
<AppDomain>https://mysubdomain.myappdomain.com</AppDomain>). The subdomainmysubdomain.mydomain.comandmydomain.comare different domains. If both need to be trusted, then both need to be in separate <AppDomain> elements. - Listing the same domain as the one specified in the SourceLocation element has no effect and may be misleading. When developing on
localhost, you don't usually need to create an <AppDomain> element for it. However, if you're implementing the Dialog API in an add-in that runs on Outlook on the web or the new Outlook on Windows, you must create an <AppDomain> element forlocalhost. - Don't include any segments of a URL past the domain. For example, don't include the full URL of a page.
- Do not put a closing slash, "/", on the value.
- Wildcards, such as
*, aren't allowed in <AppDomain> values; however, for add-ins running only in Office on Windows, there's a way to designate additional trusted domains with wildcards. See Wildcard trusted domains.
Contained in
Remarks
For more information, see Office Add-ins with an add-in only manifest.
Współpracuj z nami na GitHub
Źródło tej treści można znaleźć na GitHubie, gdzie można także tworzyć i przeglądać problemy oraz pull requesty. Więcej informacji znajdziesz w naszym przewodniku dla współautorów.
Office Add-ins