mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Fix nodejs CI
replaceAll was added in node 15, but the CI still runs node 12
This commit is contained in:
parent
4e254445d9
commit
0dbb2a7758
1 changed files with 3 additions and 3 deletions
|
@ -77,18 +77,18 @@ interface Callback {
|
|||
require.extensions['.60'] =
|
||||
function (module, filename) {
|
||||
var c = native.load(filename);
|
||||
module.exports[c.name().replaceAll('-', '_')] = function (init_properties: any) {
|
||||
module.exports[c.name().replace(/-/g, '_')] = function (init_properties: any) {
|
||||
let comp = c.create(init_properties);
|
||||
let ret = new Component(comp);
|
||||
c.properties().forEach((x: string) => {
|
||||
Object.defineProperty(ret, x.replaceAll('-', '_'), {
|
||||
Object.defineProperty(ret, x.replace(/-/g, '_'), {
|
||||
get() { return comp.get_property(x); },
|
||||
set(newValue) { comp.set_property(x, newValue); },
|
||||
enumerable: true,
|
||||
})
|
||||
});
|
||||
c.callbacks().forEach((x: string) => {
|
||||
Object.defineProperty(ret, x.replaceAll('-', '_'), {
|
||||
Object.defineProperty(ret, x.replace(/-/g, '_'), {
|
||||
get() {
|
||||
let callback = function () { return comp.invoke_callback(x, [...arguments]); } as Callback;
|
||||
callback.setHandler = function (callback) { comp.connect_callback(x, callback) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue