AppDomains 元素AppDomains element
列出 SourceLocation
您的 Office 外接程序将使用且应受 office 信任的任何域(除了元素中指定的域)。Lists any domains, in addition to the domain specified in the SourceLocation
element, that your Office Add-in will use and that should be trusted by Office. 这使域中的页面可以调用来自加载项中的 Iframe 的 Office.js Api,并具有其他效果。This enables pages in the domains to make calls to Office.js APIs from IFrames within the add-in and has other effects. 对于每个其他域,指定 AppDomain 元素。For each additional domain, specify an AppDomain element.
外接程序类型: 内容、任务窗格、邮件Add-in type: Content, Task pane, Mail
语法Syntax
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
<AppDomain>AppDomain2</AppDomain>
</AppDomains>
重要
对可以成为AppDomain元素的值的值有一些限制。There are restrictions on what can be the value of a AppDomain element. 有关详细信息,请参阅AppDomain。For more information, see AppDomain.
包含于Contained in
可以包含Can contain
注释Remarks
默认情况下,外接程序可以加载与 SourceLocation 元素中指定的位置位于同一个域中的任何页面。By default, your add-in can load any page that is in the same domain as the location specified in the SourceLocation element. 此元素不能为空。This element can't be empty.