- cr.js methods now included via es-modules - obsolete cr.define converted to simple window property. Removed unused uses of globally-accessible window.xyz.initialize properties - removed i18n DOM attributes (i18n-content, i18n-values) - importing load_time_data via esmodules is difficult considering strings.m.js must make a request to the module at the same url. webpack needs to be able to also import from the url, but even the latest wepback version is still incapable https://github.com/brave/brave-browser/issues/16182 - removed often-unused imports (e.g. util.js, promise_resolver.js, i18n_template_no_process)
16 lines
583 B
TypeScript
16 lines
583 B
TypeScript
// Copyright (c) 2021 The Brave Authors. All rights reserved.
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
// you can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
type LoadTimeData = {
|
|
getString: (key: string) => string
|
|
getStringF: (key: string, ...varArgs: string[]) => string
|
|
getInteger: (key: string) => number
|
|
getBoolean: (key: string) => boolean
|
|
set: (value: Record<string, string>) => void
|
|
data_: Record<string, string>
|
|
}
|
|
|
|
export const loadTimeData: LoadTimeData
|