Office js outlook桌面客户端中的本地存储

Office js outlook桌面客户端中的本地存储,office-js,outlook-web-addins,Office Js,Outlook Web Addins,我们可以在outlook桌面客户端中使用localstorage吗 在调试outlook web加载项期间,(存储)类型始终返回undefined。发生这种情况是因为localhost吗 我知道我可以使用ROM设置而不是本地存储,但数据超过31kb 清单文件: <?xml version="1.0" encoding="UTF-8"?> <!--Created:--> <OfficeApp xmlns="http://schemas.m

我们可以在outlook桌面客户端中使用localstorage吗

在调试outlook web加载项期间,(存储)类型始终返回undefined。发生这种情况是因为localhost吗

我知道我可以使用ROM设置而不是本地存储,但数据超过31kb

清单文件:

    <?xml version="1.0" encoding="UTF-8"?>
<!--Created:-->
<OfficeApp 
          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
          xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" 
          xsi:type="MailApp">

  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->

  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
  <Id></Id>

  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>1.0.0.0</Version>
  <ProviderName>addinName</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="addinNameOutlook" />
  <Description DefaultValue="addinNameOutlook"/>
  <IconUrl DefaultValue="~remoteAppUrl/Images/addinName64.png"/>

  <SupportUrl DefaultValue="http://www.addinName.com" />
  <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
  <AppDomains>
    <AppDomain>AppDomain1</AppDomain>
    <AppDomain>AppDomain2</AppDomain>
    <AppDomain>AppDomain3</AppDomain>
  </AppDomains>
  <!--End Basic Settings. -->

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/MessageRead.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">

        <DesktopFormFactor>
          <!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
          <FunctionFile resid="functionFile" />

          <!-- Message Read -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
            <OfficeTab id="TabDefault">
              <!-- Up to 6 Groups added per Tab -->
              <Group id="msgReadGroup">
                <Label resid="groupLabel" />
                <!-- Launch the add-in : task pane button -->
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="paneReadButtonLabel" />
                  <Supertip>
                    <Title resid="paneReadSuperTipTitle" />
                    <Description resid="paneReadSuperTipDescription" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16" />
                    <bt:Image size="32" resid="icon32" />
                    <bt:Image size="80" resid="icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="messageReadTaskPaneUrl" />
                  </Action>
                </Control>
                <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="~remoteAppUrl/Images/addinName16.png"/>
        <bt:Image id="icon32" DefaultValue="~remoteAppUrl/Images/addinName32.png"/>
        <bt:Image id="icon80" DefaultValue="~remoteAppUrl/Images/addinName80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
        <bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/login.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="addinName Outlook"/>
        <bt:String id="customTabLabel"  DefaultValue="addinName Outlook BETA"/>
        <bt:String id="paneReadButtonLabel" DefaultValue="addinName Outlook BETA"/>
        <bt:String id="paneReadSuperTipTitle" DefaultValue="addinName Outlook BETA"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="paneReadSuperTipDescription" DefaultValue="Allows you to upload mail"/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

1.0.0.0
艾迪南
恩美
应用域1
应用域2
应用域3
250
读写项目
假的

如果您需要任何信息,请告诉我。

您应该能够使用“window.localStorage”。一堆插件(比如脚本实验室)一直在运行。您遇到问题了吗?

现在我可以访问它了。没有错误,我使用vs2017调试代码。我在一个页面中设置localstorage,并尝试在另一个HTML页面中访问它。但是当我尝试访问保存的存储时,它返回null。两个页面是否在同一个域上?Localstorage(在任何浏览器中,无论office加载项如何)均为每个域。两者都位于同一个域中。在从同一页面设置Localstorage后,您是否可以立即访问它?两个页面都是外接程序的一部分吗?或者一页在外接程序中,另一页在浏览器中?是的,在同一页上设置后,我可以访问它。这两个页面都是同一加载项的一部分