调试基于事件的 Outlook 加载项 - TypeError: Office.actions._association.mappings[r.toUpperCase(...)] 不是函数

问题描述 投票:0回答:2
Windows 10 - 通过 OWA(Edge Chromium 或 Chrome)进行调试没问题(事件按预期进行),但尝试通过 Outlook 365(Microsoft 365 MSO(版本 2207 Build 16.0.15427.20182)64 位)调试相同的代码附加 VS Code (1.70.2) 会产生错误

Exception has occurred: TypeError: Office.actions._association.mappings[r.toUpperCase(...)] is not a function at C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:362564 at C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:359564 at Object.next (C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:359669) at C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:358581 at f (foundation.win32.bundle:59:206) at y (foundation.win32.bundle:59:1587) at new c (foundation.win32.bundle:59:485) at r (C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:358355) at S (C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:362376) at a (C:\Program Files\Microsoft Office\root\Office16\olk-launchevent-host.win32.bundle:15:337430)
/*
 * Office JavaScript API library
 *
 * Copyright (c) Microsoft Corporation.  All rights reserved.
 *
 * Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
 *
 * This file also contains the following Promise implementation (with a few small modifications):
 *      * @overview es6-promise - a tiny implementation of Promises/A+.
 *      * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 *      * @license   Licensed under MIT license
 *      *            See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
 *      * @version   2.3.0
 */
VSC 中的变量窗格具有预期值:

对损坏的地方有什么想法吗?

outlook office-js outlook-addin office-addins outlook-web-addins
2个回答
1
投票
尝试将 Office.actions.associate 调用移出 Office.initialize 并将其添加到 JS 文件的末尾,类似于

基于事件的激活演练智能警报演练中的代码。使用第一个演练,我测试了将调用添加到 Office.initialize,但无法运行加载项,但当我移动调用时,它运行时没有出现问题。


0
投票
file:///Users/Patrice.Ouwerkerk/Library/Group%20Containers/UBF8T346G9.Office/SolutionPackages/f76f80f15cdbc6685da0d6d1f7add1b/PackageResources/OfflineFiles/word-win32-16.01_ed80d9cc3e5e16021558d5eb7a 01e861.js

© www.soinside.com 2019 - 2024. All rights reserved.