dom-render 1.0.77 → 1.0.78

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ export declare class DomRenderProxy<T extends object> implements ProxyHandler<T>
14
14
  run(objProxy: T): void;
15
15
  initRender(target: Node): void;
16
16
  getRawSets(): RawSet[];
17
- render(raws?: RawSet[] | string): void;
17
+ render(raws?: RawSet[] | string, fullPathStr?: string): void;
18
18
  root(paths: string[], value?: any, lastDoneExecute?: boolean): string[];
19
19
  set(target: T, p: string | symbol, value: any, receiver: T): boolean;
20
20
  get(target: T, p: string | symbol, receiver: any): any;
package/DomRenderProxy.js CHANGED
@@ -57,7 +57,7 @@ var DomRenderProxy = /** @class */ (function () {
57
57
  var _this = this;
58
58
  var _a, _b, _c, _d, _e, _f, _g;
59
59
  var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, "".concat(EventManager_1.EventManager.attrPrefix, "on-create"));
60
- var createParam = undefined;
60
+ var createParam;
61
61
  if (onCreate) {
62
62
  createParam = ScriptUtils_1.ScriptUtils.evalReturn(onCreate, this._domRender_proxy);
63
63
  }
@@ -65,7 +65,7 @@ var DomRenderProxy = /** @class */ (function () {
65
65
  var innerHTML = (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
66
66
  this._targets.add(target);
67
67
  var rawSets = RawSet_1.RawSet.checkPointCreates(target, this.config);
68
- // console.log('-------rawSet', rawSets)
68
+ // console.log('initRender -------rawSet', rawSets)
69
69
  // 중요 초기에 한번 튕겨줘야함.
70
70
  EventManager_1.eventManager.applyEvent(this._domRender_proxy, EventManager_1.eventManager.findAttrElements(target, this.config), this.config);
71
71
  rawSets.forEach(function (it) {
@@ -95,7 +95,8 @@ var DomRenderProxy = /** @class */ (function () {
95
95
  });
96
96
  return Array.from(set);
97
97
  };
98
- DomRenderProxy.prototype.render = function (raws) {
98
+ // 중요 important
99
+ DomRenderProxy.prototype.render = function (raws, fullPathStr) {
99
100
  var _this = this;
100
101
  if (typeof raws === 'string') {
101
102
  var iter = this._rawSets.get(raws);
@@ -108,15 +109,40 @@ var DomRenderProxy = /** @class */ (function () {
108
109
  }
109
110
  var removeRawSets = [];
110
111
  (raws !== null && raws !== void 0 ? raws : this.getRawSets()).forEach(function (it) {
111
- var _a;
112
+ var _a, _b, _c;
112
113
  it.getUsingTriggerVariables(_this.config).forEach(function (path) { return _this.addRawSet(path, it); });
113
- // console.log('------->', it, it.isConnected)
114
+ // console.log('------->', it, it.isConnected);
114
115
  if (it.isConnected) {
115
- if ((_a = it.detect) === null || _a === void 0 ? void 0 : _a.action) {
116
+ // 중요 render될때 targetAttribute 체크 해야함.
117
+ var targetAttrMap = (_b = (_a = it.point.node) === null || _a === void 0 ? void 0 : _a.getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, EventManager_1.EventManager.normalAttrMapAttrName);
118
+ if ((_c = it.detect) === null || _c === void 0 ? void 0 : _c.action) {
116
119
  it.detect.action();
117
120
  }
121
+ else if (it.type === RawSet_1.RawSetType.TARGET_ELEMENT && it.data && fullPathStr && targetAttrMap && it.fragment.render) {
122
+ new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
123
+ // it?.data.onChangeAttrRender(k, null, v);
124
+ var isUsing = EventManager_1.EventManager.isUsingThisVar(v, "this.".concat(fullPathStr));
125
+ if (isUsing) {
126
+ var render = it.fragment.render;
127
+ // console.log('render-->', (it.fragment as any).render)
128
+ var script = "".concat(render.renderScript, " return ").concat(v, " ");
129
+ var cval = ScriptUtils_1.ScriptUtils.eval(script, Object.assign(_this._domRender_proxy, { __render: render }));
130
+ it.data.onChangeAttrRender(k, cval);
131
+ }
132
+ // console.log('---?', v, fullPathStr, isUsing);
133
+ });
134
+ // ------------------->
135
+ }
118
136
  else {
119
137
  var rawSets = it.render(_this._domRender_proxy, _this.config);
138
+ // 대상 attribute 있으면
139
+ // const targetAttrs = (it.point.node as Element).getAttribute(EventManager.normalAttrMapAttrName);
140
+ // if (it?.data.onChangeAttrRender && it.type === RawSetType.TARGET_ELEMENT && targetAttrs) {
141
+ // new Map<string, string>(JSON.parse(targetAttrs)).forEach((v, k) => {
142
+ // it?.data.onChangeAttrRender(k, null, v);
143
+ // });
144
+ // }
145
+ // 그외 자식들 render
120
146
  if (rawSets && rawSets.length > 0) {
121
147
  _this.render(rawSets);
122
148
  }
@@ -159,6 +185,7 @@ var DomRenderProxy = /** @class */ (function () {
159
185
  var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
160
186
  if (lastDoneExecute) {
161
187
  var iterable = this._rawSets.get(fullPathStr_1);
188
+ // console.log('----->', iterable);
162
189
  // array check
163
190
  var front = strings.slice(0, strings.length - 1).map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('');
164
191
  var last = strings[strings.length - 1];
@@ -170,8 +197,7 @@ var DomRenderProxy = /** @class */ (function () {
170
197
  }
171
198
  }
172
199
  else if (iterable) {
173
- // console.log('----->', iterable)
174
- this.render(Array.from(iterable));
200
+ this.render(Array.from(iterable), fullPathStr_1);
175
201
  }
176
202
  this._targets.forEach(function (it) {
177
203
  // console.log('target------->,', it)
@@ -285,7 +311,7 @@ var DomRenderProxy = /** @class */ (function () {
285
311
  };
286
312
  DomRenderProxy.prototype.addRawSet = function (path, rawSet) {
287
313
  var _a;
288
- // console.log('addRawSet-->', path, rawSet)
314
+ // console.log('addRawSet--> path:', path, 'rawSet:', rawSet)
289
315
  if (!this._rawSets.get(path)) {
290
316
  this._rawSets.set(path, new Set());
291
317
  }
package/README.MD CHANGED
@@ -7,7 +7,7 @@ DOM-RENDER
7
7
 
8
8
  # 🚀 Quick start
9
9
  ```html
10
- <script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.77/dist/bundle.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.78/dist/bundle.js"></script>
11
11
  ```
12
12
  ```html
13
13
  <!DOCTYPE html>
package/RawSet.d.ts CHANGED
@@ -47,6 +47,12 @@ export declare type ElementInitCallBack = {
47
47
  targetElement: TargetElement;
48
48
  creatorMetaData: CreatorMetaData;
49
49
  };
50
+ export declare enum RawSetType {
51
+ TEXT = "TEXT",
52
+ TARGET_ELEMENT = "TARGET_ELEMENT",
53
+ TARGET_ATTR = "TARGET_ATTR",
54
+ UNKOWN = "UNKOWN"
55
+ }
50
56
  export declare type Render = {
51
57
  rawset?: RawSet;
52
58
  scripts?: {
@@ -63,8 +69,10 @@ export declare type Render = {
63
69
  };
64
70
  export declare class RawSet {
65
71
  uuid: string;
72
+ type: RawSetType;
66
73
  point: {
67
74
  start: Comment;
75
+ node: Node;
68
76
  end: Comment;
69
77
  thisVariableName?: string | null;
70
78
  };
@@ -72,7 +80,7 @@ export declare class RawSet {
72
80
  detect?: {
73
81
  action: Function;
74
82
  } | undefined;
75
- data: any;
83
+ data?: any;
76
84
  static readonly DR = "dr";
77
85
  static readonly DR_IF_NAME = "dr-if";
78
86
  static readonly DR_FOR_NAME = "dr-for";
@@ -96,8 +104,9 @@ export declare class RawSet {
96
104
  static readonly drAttrsOriginName: Attrs;
97
105
  static readonly DR_TAGS: never[];
98
106
  static readonly DR_ATTRIBUTES: string[];
99
- constructor(uuid: string, point: {
107
+ constructor(uuid: string, type: RawSetType, point: {
100
108
  start: Comment;
109
+ node: Node;
101
110
  end: Comment;
102
111
  thisVariableName?: string | null;
103
112
  }, fragment: DocumentFragment, detect?: {
package/RawSet.js CHANGED
@@ -20,7 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
20
20
  return to.concat(ar || Array.prototype.slice.call(from));
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.RawSet = exports.DestroyOptionType = void 0;
23
+ exports.RawSet = exports.RawSetType = exports.DestroyOptionType = void 0;
24
24
  var RandomUtils_1 = require("./utils/random/RandomUtils");
25
25
  var StringUtils_1 = require("./utils/string/StringUtils");
26
26
  var ScriptUtils_1 = require("./utils/script/ScriptUtils");
@@ -47,14 +47,22 @@ var DestroyOptionType;
47
47
  DestroyOptionType["NO_DESTROY"] = "NO_DESTROY";
48
48
  DestroyOptionType["NO_MESSENGER_DESTROY"] = "NO_MESSENGER_DESTROY";
49
49
  })(DestroyOptionType = exports.DestroyOptionType || (exports.DestroyOptionType = {}));
50
+ var RawSetType;
51
+ (function (RawSetType) {
52
+ RawSetType["TEXT"] = "TEXT";
53
+ RawSetType["TARGET_ELEMENT"] = "TARGET_ELEMENT";
54
+ RawSetType["TARGET_ATTR"] = "TARGET_ATTR";
55
+ RawSetType["UNKOWN"] = "UNKOWN";
56
+ })(RawSetType = exports.RawSetType || (exports.RawSetType = {}));
50
57
  var RawSet = /** @class */ (function () {
51
- function RawSet(uuid, point, fragment, detect, data) {
52
- if (data === void 0) { data = {}; }
58
+ function RawSet(uuid, type, point, fragment, detect, data) {
53
59
  this.uuid = uuid;
60
+ this.type = type;
54
61
  this.point = point;
55
62
  this.fragment = fragment;
56
63
  this.detect = detect;
57
64
  this.data = data;
65
+ // console.log('rawset constructor->', (this.point.node as Element).getAttributeNames());
58
66
  }
59
67
  Object.defineProperty(RawSet.prototype, "isConnected", {
60
68
  get: function () {
@@ -75,11 +83,17 @@ var RawSet = /** @class */ (function () {
75
83
  }
76
84
  else if (cNode.nodeType === Node.ELEMENT_NODE) {
77
85
  var element_1 = cNode;
78
- var targetAttrNames = ((_c = (_b = config === null || config === void 0 ? void 0 : config.targetAttrs) === null || _b === void 0 ? void 0 : _b.map(function (it) { return it.name; })) !== null && _c !== void 0 ? _c : []).concat(RawSet.DR_ATTRIBUTES);
79
- script = targetAttrNames.map(function (it) {
80
- // console.log('-?', element.getAttribute(it))
81
- return element_1.getAttribute(it);
82
- }).filter(function (it) { return it; }).join(';');
86
+ var targetAttrNames = ((_c = (_b = config === null || config === void 0 ? void 0 : config.targetAttrs) === null || _b === void 0 ? void 0 : _b.map(function (it) { return it.name; })) !== null && _c !== void 0 ? _c : []).concat(RawSet.DR_ATTRIBUTES); // .concat(EventManager.normalAttrMapAttrName);
87
+ var targetScripts_1 = targetAttrNames.map(function (it) { return element_1.getAttribute(it); }).filter(function (it) { return it; });
88
+ var targetAttrMap = element_1.getAttribute(EventManager_1.EventManager.normalAttrMapAttrName);
89
+ if (targetAttrMap) {
90
+ // console.log('----->', targetAttr);
91
+ new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
92
+ targetScripts_1.push(v);
93
+ });
94
+ }
95
+ script = targetScripts_1.join(';');
96
+ // attribute쪽 체크하는거 추가
83
97
  // console.log('----!!!!!-->', targetAttrNames)
84
98
  // const otherAttrs = element.getAttributeNames()
85
99
  // .filter(it => !targetAttrNames.includes(it.toLowerCase()) && RawSet.isExporesion(element.getAttribute(it)))
@@ -104,6 +118,7 @@ var RawSet = /** @class */ (function () {
104
118
  // console.log('usingTriggerVariable----------->', usingTriggerVariables)
105
119
  return usingTriggerVariables;
106
120
  };
121
+ // 중요 render
107
122
  RawSet.prototype.render = function (obj, config) {
108
123
  var _this = this;
109
124
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -287,9 +302,9 @@ var RawSet = /** @class */ (function () {
287
302
  this.childAllRemove();
288
303
  (_a = this.point.start.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(genNode, this.point.start.nextSibling);
289
304
  };
290
- // 중요
305
+ // 중요 important
291
306
  RawSet.checkPointCreates = function (element, config) {
292
- var _a, _b, _c, _d;
307
+ var _a, _b, _c, _d, _e, _f, _g, _h;
293
308
  var thisVariableName = element.__domrender_this_variable_name;
294
309
  // console.log('checkPointCreates thisVariableName', thisVariableName);
295
310
  var nodeIterator = config.window.document.createNodeIterator(element, NodeFilter.SHOW_ALL, {
@@ -298,7 +313,7 @@ var RawSet = /** @class */ (function () {
298
313
  if (node.nodeType === Node.TEXT_NODE) {
299
314
  // console.log('????????', node.parentElement, node.parentElement?.getAttribute('dr-pre'));
300
315
  // console.log('???????/',node.textContent, node.parentElement?.getAttribute('dr-pre'))
301
- // 나중에
316
+ // TODO: 나중에
302
317
  // const between = StringUtils.betweenRegexpStr('[$#]\\{', '\\}', StringUtils.deleteEnter((node as Text).data ?? ''))
303
318
  var between = RawSet.exporesionGrouops(StringUtils_1.StringUtils.deleteEnter((_a = node.data) !== null && _a !== void 0 ? _a : ''));
304
319
  // console.log('bbbb', between)
@@ -335,52 +350,53 @@ var RawSet = /** @class */ (function () {
335
350
  var _loop_1 = function () {
336
351
  if (currentNode.nodeType === Node.TEXT_NODE) {
337
352
  var text = (_a = currentNode.textContent) !== null && _a !== void 0 ? _a : '';
338
- var template_1 = config.window.document.createElement('template');
353
+ var template = config.window.document.createElement('template');
339
354
  // const a = StringUtils.regexExec(/\$\{.*?\}/g, text);
340
355
  // const a = StringUtils.regexExec(/[$#]\{.*?\}/g, text);
341
- // const a = StringUtils.betweenRegexpStr('[$#]\\{', '\\}', text); // <--나중에..
342
- var a = RawSet.exporesionGrouops(text); // <--나중에..
343
- var map = a.map(function (it) {
344
- return {
345
- uuid: RandomUtils_1.RandomUtils.uuid(),
346
- content: it[0],
347
- regexArr: it
348
- };
349
- });
350
- var lasterIndex_1 = 0;
351
- map.forEach(function (it) {
352
- var regexArr = it.regexArr;
353
- var preparedText = regexArr.input.substring(lasterIndex_1, regexArr.index);
354
- var start = config.window.document.createComment("start text ".concat(it.uuid));
355
- var end = config.window.document.createComment("end text ".concat(it.uuid));
356
+ // const a = StringUtils.betweenRegexpStr('[$#]\\{', '\\}', text); // <--TODO: 나중에..
357
+ var groups = RawSet.exporesionGrouops(text);
358
+ var map = groups.map(function (it) { return ({ uuid: RandomUtils_1.RandomUtils.uuid(), content: it[0], regexArr: it }); });
359
+ var lasterIndex = 0;
360
+ for (var i = 0; i < map.length; i++) {
361
+ var it_4 = map[i];
362
+ var regexArr = it_4.regexArr;
363
+ var preparedText = regexArr.input.substring(lasterIndex, regexArr.index);
364
+ var start = config.window.document.createComment("start text ".concat(it_4.uuid));
365
+ var end = config.window.document.createComment("end text ".concat(it_4.uuid));
356
366
  // layout setting
357
- template_1.content.append(document.createTextNode(preparedText)); // 사이사이값.
358
- template_1.content.append(start);
359
- template_1.content.append(end);
367
+ template.content.append(document.createTextNode(preparedText)); // 사이사이값.
368
+ template.content.append(start);
369
+ template.content.append(end);
360
370
  // content
361
371
  var fragment = config.window.document.createDocumentFragment();
362
- fragment.append(config.window.document.createTextNode(it.content));
363
- pars.push(new RawSet(it.uuid, {
372
+ fragment.append(config.window.document.createTextNode(it_4.content));
373
+ pars.push(new RawSet(it_4.uuid, RawSetType.TEXT, {
364
374
  start: start,
375
+ node: currentNode,
365
376
  end: end,
366
377
  thisVariableName: thisVariableName
367
378
  }, fragment));
368
- lasterIndex_1 = regexArr.index + it.content.length;
369
- });
370
- template_1.content.append(config.window.document.createTextNode(text.substring(lasterIndex_1, text.length)));
371
- (_b = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(template_1.content, currentNode);
379
+ lasterIndex = regexArr.index + it_4.content.length;
380
+ }
381
+ template.content.append(config.window.document.createTextNode(text.substring(lasterIndex, text.length)));
382
+ (_b = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(template.content, currentNode);
372
383
  }
373
- else {
384
+ else if (currentNode.nodeType === Node.ELEMENT_NODE) {
374
385
  var uuid = RandomUtils_1.RandomUtils.uuid();
386
+ var element_3 = currentNode;
375
387
  var fragment = config.window.document.createDocumentFragment();
376
388
  var start = config.window.document.createComment("start ".concat(uuid));
377
389
  var end = config.window.document.createComment("end ".concat(uuid));
378
390
  // console.log('start--', uuid)
379
- (_c = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _c === void 0 ? void 0 : _c.insertBefore(start, currentNode);
380
- (_d = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _d === void 0 ? void 0 : _d.insertBefore(end, currentNode.nextSibling);
391
+ var isElement = ((_d = (_c = config.targetElements) === null || _c === void 0 ? void 0 : _c.map(function (it) { return it.name.toLowerCase(); })) !== null && _d !== void 0 ? _d : []).includes(element_3.tagName.toLowerCase());
392
+ var targetAttrNames_2 = ((_f = (_e = config.targetAttrs) === null || _e === void 0 ? void 0 : _e.map(function (it) { return it.name; })) !== null && _f !== void 0 ? _f : []).concat(RawSet.DR_ATTRIBUTES);
393
+ var isAttr = element_3.getAttributeNames().filter(function (it) { return targetAttrNames_2.includes(it.toLowerCase()); }).length > 0;
394
+ (_g = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _g === void 0 ? void 0 : _g.insertBefore(start, currentNode);
395
+ (_h = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _h === void 0 ? void 0 : _h.insertBefore(end, currentNode.nextSibling);
381
396
  fragment.append(currentNode);
382
- pars.push(new RawSet(uuid, {
397
+ pars.push(new RawSet(uuid, isElement ? RawSetType.TARGET_ELEMENT : (isAttr ? RawSetType.TARGET_ATTR : RawSetType.UNKOWN), {
383
398
  start: start,
399
+ node: currentNode,
384
400
  end: end,
385
401
  thisVariableName: thisVariableName
386
402
  }, fragment));
@@ -458,8 +474,8 @@ var RawSet = /** @class */ (function () {
458
474
  var nodeIterator = config.window.document.createNodeIterator(subElement, NodeFilter.SHOW_ELEMENT, {
459
475
  acceptNode: function (node) {
460
476
  if (node.nodeType === Node.ELEMENT_NODE) {
461
- var element_3 = node;
462
- return element_3.hasAttribute(as) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
477
+ var element_4 = node;
478
+ return element_4.hasAttribute(as) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
463
479
  }
464
480
  else {
465
481
  return NodeFilter.FILTER_REJECT;
@@ -469,9 +485,9 @@ var RawSet = /** @class */ (function () {
469
485
  var node;
470
486
  // eslint-disable-next-line no-cond-assign
471
487
  while (node = nodeIterator.nextNode()) {
472
- var element_4 = node;
473
- element_4.setAttribute(to, (_a = element_4.getAttribute(as)) !== null && _a !== void 0 ? _a : '');
474
- element_4.removeAttribute(as);
488
+ var element_5 = node;
489
+ element_5.setAttribute(to, (_a = element_5.getAttribute(as)) !== null && _a !== void 0 ? _a : '');
490
+ element_5.removeAttribute(as);
475
491
  }
476
492
  });
477
493
  };
@@ -581,7 +597,7 @@ var RawSet = /** @class */ (function () {
581
597
  template: template,
582
598
  callBack: function (element, obj, rawSet, attrs) {
583
599
  var _a, _b, _c, _d;
584
- // console.log('callback------->')
600
+ // console.log('callback------->', element)
585
601
  if (!obj.__domrender_components) {
586
602
  obj.__domrender_components = {};
587
603
  }
@@ -590,6 +606,7 @@ var RawSet = /** @class */ (function () {
590
606
  var attribute = DomUtils_1.DomUtils.getAttributeToObject(element);
591
607
  var renderScript = 'var $component = this.__render.component; var $element = this.__render.element; var $router = this.__render.router; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; var $creatorMetaData = this.__render.creatorMetaData;';
592
608
  var render = Object.freeze({
609
+ renderScript: renderScript,
593
610
  element: element,
594
611
  innerHTML: element.innerHTML,
595
612
  attribute: attribute,
@@ -625,6 +642,16 @@ var RawSet = /** @class */ (function () {
625
642
  i.creator = new Proxy(rawSet.point.thisVariableName ? ScriptUtils_1.ScriptUtils.evalReturn(rawSet.point.thisVariableName, obj) : obj, new Types_1.DomRenderFinalProxy());
626
643
  this.__creatorMetaData = i;
627
644
  render = __assign({ component: instance, creatorMetaData: i }, render);
645
+ // 중요 dr-normal-attr-map
646
+ var normalAttrMap = element.getAttribute(EventManager_1.EventManager.normalAttrMapAttrName);
647
+ if (instance.onChangeAttrRender && normalAttrMap) {
648
+ new Map(JSON.parse(normalAttrMap)).forEach(function (value, key) {
649
+ var script = "".concat(renderScript, " return ").concat(value, " ");
650
+ var cval = ScriptUtils_1.ScriptUtils.eval(script, Object.assign(obj, { __render: render }));
651
+ // element.setAttribute(key, cval);
652
+ instance.onChangeAttrRender(key, cval);
653
+ });
654
+ }
628
655
  // dr-on-create onCreateRender
629
656
  var onCreate = element.getAttribute("".concat(EventManager_1.EventManager.attrPrefix, "on-create"));
630
657
  this.__render = render;
@@ -662,10 +689,10 @@ var RawSet = /** @class */ (function () {
662
689
  var data = RawSet.drThisCreate(element, "this.__domrender_components.".concat(componentKey), '', true, obj, config);
663
690
  // 넘어온 innerHTML에 this가 있는걸 다시 복호화해서 제대로 작동하도록한다.
664
691
  if (innerHTMLThisRandom) {
665
- var template_2 = config.window.document.createElement('template');
666
- template_2.content.append(data);
667
- template_2.innerHTML = template_2.innerHTML.replace(RegExp(innerHTMLThisRandom, 'g'), 'this.');
668
- data = template_2.content;
692
+ var template_1 = config.window.document.createElement('template');
693
+ template_1.content.append(data);
694
+ template_1.innerHTML = template_1.innerHTML.replace(RegExp(innerHTMLThisRandom, 'g'), 'this.');
695
+ data = template_1.content;
669
696
  }
670
697
  data.render = render;
671
698
  return data;