about summary refs log tree commit diff stats
diff options
context:
space:
mode:
m---------lib/chakasu0
m---------lib/chame0
-rw-r--r--src/html/chadombuilder.nim10
-rw-r--r--src/html/dom.nim3
-rw-r--r--src/server/buffer.nim4
-rw-r--r--src/version.nim4
6 files changed, 16 insertions, 5 deletions
diff --git a/lib/chakasu b/lib/chakasu
-Subproject ab4a0a68b91b5f39f9308a0ab897ce95e81920b
+Subproject 40d7f44e1b5ceb3fc9b413b26a0cbc2884f2c7e
diff --git a/lib/chame b/lib/chame
-Subproject c9134843c3b10427c8945384656def4f6dd9251
+Subproject eac0d4e07d754e9c4090f4a6f9a25c569d79555
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim
index 5ccc7ee2..23273747 100644
--- a/src/html/chadombuilder.nim
+++ b/src/html/chadombuilder.nim
@@ -120,7 +120,14 @@ proc insertText(builder: DOMBuilder[Node], parent: Node, text: string,
     discard parent.insertBefore(text, before)
 
 proc remove(builder: DOMBuilder[Node], child: Node) =
-  child.remove(true)
+  child.remove(suppressObservers = true)
+
+proc moveChildren(builder: DOMBuilder[Node], fromNode, toNode: Node) =
+  var tomove = fromNode.childList
+  for node in tomove:
+    node.remove(suppressObservers = true)
+  for child in tomove:
+    toNode.insert(child, nil)
 
 proc addAttrsIfMissing(builder: DOMBuilder[Node], element: Node,
     attrs: Table[string, string]) =
@@ -183,6 +190,7 @@ proc newChaDOMBuilder(url: URL, window: Window): ChaDOMBuilder =
     insertBefore: insertBefore,
     insertText: insertText,
     remove: remove,
+    moveChildren: moveChildren,
     addAttrsIfMissing: addAttrsIfMissing,
     setScriptAlreadyStarted: setScriptAlreadyStarted,
     associateWithForm: associateWithForm,
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 6f12f382..7843a424 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -36,6 +36,7 @@ import utils/twtstr
 
 import chakasu/charset
 import chakasu/decoderstream
+import chakasu/encoderstream
 
 import chame/tags
 
@@ -2634,7 +2635,7 @@ proc fetchClassicScript(element: HTMLScriptElement, url: URL,
       else:
         cs
       let decoder = newDecoderStream(response.body, cs = cs)
-      let source = decoder.readAll()
+      let source = newEncoderStream(decoder).readAll()
       let script = createClassicScript(source, url, options, false)
       element.markAsReady(ScriptResult(t: RESULT_SCRIPT, script: script))
 
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index 053483b5..6303fd65 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -52,6 +52,7 @@ import xhr/formdata as formdata_impl
 
 import chakasu/charset
 import chakasu/decoderstream
+import chakasu/encoderstream
 
 import chame/tags
 
@@ -605,7 +606,8 @@ proc loadResource(buffer: Buffer, elem: HTMLLinkElement): EmptyPromise =
           # utf8 anyways
           let ss = newStringStream(s.get)
           #TODO non-utf-8 css
-          let source = newDecoderStream(ss, cs = CHARSET_UTF_8).readAll()
+          let ds = newDecoderStream(ss, cs = CHARSET_UTF_8)
+          let source = newEncoderStream(ds, cs = CHARSET_UTF_8).readAll()
           let ss2 = newStringStream(source)
           elem.sheet = parseStylesheet(ss2))
 
diff --git a/src/version.nim b/src/version.nim
index 2be08e9e..5e1976db 100644
--- a/src/version.nim
+++ b/src/version.nim
@@ -27,5 +27,5 @@ tryImport chakasu/version, "chakasu"
 tryImport chame/version, "chame"
 
 static:
-  checkVersion("chakasu", 0, 1, 2)
-  checkVersion("chame", 0, 9, 3)
+  checkVersion("chakasu", 0, 2, 0)
+  checkVersion("chame", 0, 10, 1)
t <hut@lavabit.com> 2010-02-16 02:03:46 +0100 incremented version number and updated pydoc html files' href='/akspecs/ranger/commit/doc/pydoc/ranger.gui.bar.html?h=v1.8.1&id=34a60763e79546e0f84e30fbcc430632f3dbb39e'>34a60763 ^
4c13e1f2 ^







34a60763 ^



4c13e1f2 ^



















34a60763 ^
4c13e1f2 ^




34a60763 ^



4c13e1f2 ^

34a60763 ^
4c13e1f2 ^


34a60763 ^
4c13e1f2 ^



34a60763 ^
4c13e1f2 ^

34a60763 ^
4c13e1f2 ^





34a60763 ^

4c13e1f2 ^

34a60763 ^
4c13e1f2 ^

34a60763 ^
4c13e1f2 ^




34a60763 ^
4c13e1f2 ^


























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238