@marko/runtime-tags 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/debug/dom.js CHANGED
@@ -132,14 +132,15 @@ function forTo(to, from, step, cb) {
132
132
  }
133
133
 
134
134
  // src/dom/schedule.ts
135
- var task;
135
+ var runTask;
136
136
  var port2 = /* @__PURE__ */ (() => {
137
137
  const { port1, port2: port22 } = new MessageChannel();
138
138
  port1.onmessage = () => {
139
139
  isScheduled = false;
140
140
  if (true) {
141
- task.run(run);
142
- task = void 0;
141
+ const run2 = runTask;
142
+ runTask = void 0;
143
+ run2();
143
144
  } else {
144
145
  run();
145
146
  }
@@ -150,11 +151,12 @@ var isScheduled;
150
151
  function schedule() {
151
152
  if (!isScheduled) {
152
153
  if (true) {
153
- task = console.createTask?.("queue") || {
154
- run(fn) {
155
- fn();
156
- }
157
- };
154
+ if (console.createTask) {
155
+ const task = console.createTask("queue");
156
+ runTask = () => task.run(run);
157
+ } else {
158
+ runTask = run;
159
+ }
158
160
  }
159
161
  isScheduled = true;
160
162
  queueMicrotask(flushAndWaitFrame);
@@ -162,7 +164,7 @@ function schedule() {
162
164
  }
163
165
  function flushAndWaitFrame() {
164
166
  if (true) {
165
- task.run(run);
167
+ runTask();
166
168
  } else {
167
169
  run();
168
170
  }
@@ -45,14 +45,15 @@ function forTo(to, from, step, cb) {
45
45
  }
46
46
 
47
47
  // src/dom/schedule.ts
48
- var task;
48
+ var runTask;
49
49
  var port2 = /* @__PURE__ */ (() => {
50
50
  const { port1, port2: port22 } = new MessageChannel();
51
51
  port1.onmessage = () => {
52
52
  isScheduled = false;
53
53
  if (true) {
54
- task.run(run);
55
- task = void 0;
54
+ const run2 = runTask;
55
+ runTask = void 0;
56
+ run2();
56
57
  } else {
57
58
  run();
58
59
  }
@@ -63,11 +64,12 @@ var isScheduled;
63
64
  function schedule() {
64
65
  if (!isScheduled) {
65
66
  if (true) {
66
- task = console.createTask?.("queue") || {
67
- run(fn) {
68
- fn();
69
- }
70
- };
67
+ if (console.createTask) {
68
+ const task = console.createTask("queue");
69
+ runTask = () => task.run(run);
70
+ } else {
71
+ runTask = run;
72
+ }
71
73
  }
72
74
  isScheduled = true;
73
75
  queueMicrotask(flushAndWaitFrame);
@@ -75,7 +77,7 @@ function schedule() {
75
77
  }
76
78
  function flushAndWaitFrame() {
77
79
  if (true) {
78
- task.run(run);
80
+ runTask();
79
81
  } else {
80
82
  run();
81
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/runtime-tags",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",