Skip to content

Commit 528a2c3

Browse files
committed
make paintworklet not async
1 parent 7bf3a09 commit 528a2c3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/helper/browser/createBase64PaintWorkletFactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ function createURL(base64, sourcemapArg, enableUnicodeArg) {
2222

2323
export function createBase64PaintWorkletFactory(base64, sourcemapArg, enableUnicodeArg) {
2424
var url;
25-
return async function PaintWorkletFactory(options) {
25+
return function PaintWorkletFactory(options) {
2626
url = url || createURL(base64, sourcemapArg, enableUnicodeArg);
27-
return await CSS.paintWorklet.addModule(url, options);
27+
return CSS.paintWorklet.addModule(url, options);
2828
};
2929
}
3030

src/helper/browser/createInlinePaintWorkletFactory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ function createURL(fn, sourcemapArg) {
88

99
export function createInlinePaintWorkletFactory(fn, sourcemapArg) {
1010
var url;
11-
return async function PaintWorkletFactory(options) {
11+
return function PaintWorkletFactory(options) {
1212
url = url || createURL(fn, sourcemapArg);
13-
return await CSS.paintWorklet.addModule(url, options);
13+
return CSS.paintWorklet.addModule(url, options);
1414
};
1515
}
1616

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function createURLPaintWorkletFactory(url) {
2-
return async function PaintWorkletFactory(options) {
3-
return await CSS.paintWorklet.addModule(url, options);
2+
return function PaintWorkletFactory(options) {
3+
return CSS.paintWorklet.addModule(url, options);
44
};
55
}
66

0 commit comments

Comments
 (0)