添加一些html相关dart

This commit is contained in:
shenjack 2024-03-04 22:52:37 +08:00
parent 0f4b32738d
commit fb848c6e77
Signed by: shenjack
GPG Key ID: 7B1134A979775551
3 changed files with 812 additions and 121 deletions

View File

@ -817,7 +817,7 @@
} }
}, },
H = { H = {
hN: function hN() { }, Js_Const: function hN() { },
jb(a) { jb(a) {
return new H.dn(a) return new H.dn(a)
}, },
@ -935,7 +935,7 @@
}, },
lr(a) { lr(a) {
var s, r, q, p var s, r, q, p
if (a instanceof P.m) return H.U(H.Z(a), null) if (a instanceof P.Object) return H.U(H.Z(a), null)
if (J.aA(a) === C.R || t.cC.b(a)) { if (J.aA(a) === C.R || t.cC.b(a)) {
s = C.q(a) s = C.q(a)
r = s !== "Object" && s !== "" r = s !== "Object" && s !== ""
@ -1516,24 +1516,24 @@
} }
}, },
l1(a, b, c) { l1(a, b, c) {
var s, r, q, p, o, n = $.iL var s, r, var_q, p, o, n = $.iL
if (n == null) n = $.iL = H.em("interceptor") if (n == null) n = $.iL = H.em("interceptor")
s = $.bC s = $.bC
if (s == null) s = $.bC = H.em("receiver") if (s == null) s = $.bC = H.em("receiver")
r = b.length r = b.length
q = c || r >= 28 var_q = c || r >= 28
if (q) return H.l0(r, c, a, b) if (var_q) return H.l0(r, c, a, b)
if (r === 1) { if (r === 1) {
q = "return function(){return this." + n + "." + H.d(a) + "(this." + s + ");" var_q = "return function(){return this." + n + "." + H.d(a) + "(this." + s + ");"
p = $.aa p = $.aa
$.aa = p + 1 $.aa = p + 1
return new Function(q + H.d(p) + "}")() return new Function(var_q + H.d(p) + "}")()
} }
o = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, r - 1).join(",") o = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, r - 1).join(",")
q = "return function(" + o + "){return this." + n + "." + H.d(a) + "(this." + s + ", " + o + ");" var_q = "return function(" + o + "){return this." + n + "." + H.d(a) + "(this." + s + ", " + o + ");"
p = $.aa p = $.aa
$.aa = p + 1 $.aa = p + 1
return new Function(q + H.d(p) + "}")() return new Function(var_q + H.d(p) + "}")()
}, },
i6(a) { i6(a) {
return H.l2(a) return H.l2(a)
@ -2135,7 +2135,7 @@
}, },
Z(a) { Z(a) {
var s var s
if (a instanceof P.m) { if (a instanceof P.Object) {
s = a.$ti s = a.$ti
return s != null ? s : H.i3(a) return s != null ? s : H.i3(a)
} }
@ -2252,7 +2252,7 @@
var s, r = this var s, r = this
if (a == null) return H.hb(r) if (a == null) return H.hb(r)
s = r.r s = r.r
if (a instanceof P.m) return !!a[s] if (a instanceof P.Object) return !!a[s]
return !!J.aA(a)[s] return !!J.aA(a)[s]
}, },
mF(a) { mF(a) {
@ -2261,7 +2261,7 @@
if (typeof a != "object") return !1 if (typeof a != "object") return !1
if (Array.isArray(a)) return !0 if (Array.isArray(a)) return !0
s = r.r s = r.r
if (a instanceof P.m) return !!a[s] if (a instanceof P.Object) return !!a[s]
return !!J.aA(a)[s] return !!J.aA(a)[s]
}, },
p6(a) { p6(a) {
@ -2312,28 +2312,28 @@
return false; return false;
throw H.b(H.Q(object, "bool")) throw H.b(H.Q(object, "bool"))
}, },
oR(a) { as_bool_s(a) {
if (!0 === a) return !0 if (!0 === a) return !0
if (!1 === a) return !1 if (!1 === a) return !1
if (a == null) return a if (a == null) return a
throw H.b(H.Q(a, "bool")) throw H.b(H.Q(a, "bool"))
}, },
oQ(a) { as_bool_q(a) {
if (!0 === a) return !0 if (!0 === a) return !0
if (!1 === a) return !1 if (!1 === a) return !1
if (a == null) return a if (a == null) return a
throw H.b(H.Q(a, "bool?")) throw H.b(H.Q(a, "bool?"))
}, },
oS(a) { as_double(a) {
if (typeof a == "number") return a if (typeof a == "number") return a
throw H.b(H.Q(a, "double")) throw H.b(H.Q(a, "double"))
}, },
oU(a) { as_double_s(a) {
if (typeof a == "number") return a if (typeof a == "number") return a
if (a == null) return a if (a == null) return a
throw H.b(H.Q(a, "double")) throw H.b(H.Q(a, "double"))
}, },
oT(a) { as_double_q(a) {
if (typeof a == "number") return a if (typeof a == "number") return a
if (a == null) return a if (a == null) return a
throw H.b(H.Q(a, "double?")) throw H.b(H.Q(a, "double?"))
@ -3334,7 +3334,7 @@
if (typeof a == "function") return J.ad.prototype if (typeof a == "function") return J.ad.prototype
return a return a
} }
if (a instanceof P.m) return a if (a instanceof P.Object) return a
return J.hl(a) return J.hl(a)
}, },
t(a) { t(a) {
@ -3345,7 +3345,7 @@
if (typeof a == "function") return J.ad.prototype if (typeof a == "function") return J.ad.prototype
return a return a
} }
if (a instanceof P.m) return a if (a instanceof P.Object) return a
return J.hl(a) return J.hl(a)
}, },
al(a) { al(a) {
@ -3355,26 +3355,26 @@
if (typeof a == "function") return J.ad.prototype if (typeof a == "function") return J.ad.prototype
return a return a
} }
if (a instanceof P.m) return a if (a instanceof P.Object) return a
return J.hl(a) return J.hl(a)
}, },
nb(a) { nb(a) {
if (typeof a == "number") return J.aJ.prototype if (typeof a == "number") return J.aJ.prototype
if (a == null) return a if (a == null) return a
if (!(a instanceof P.m)) return J.av.prototype if (!(a instanceof P.Object)) return J.av.prototype
return a return a
}, },
nc(a) { nc(a) {
if (typeof a == "number") return J.aJ.prototype if (typeof a == "number") return J.aJ.prototype
if (typeof a == "string") return J.ar.prototype if (typeof a == "string") return J.ar.prototype
if (a == null) return a if (a == null) return a
if (!(a instanceof P.m)) return J.av.prototype if (!(a instanceof P.Object)) return J.av.prototype
return a return a
}, },
a2(a) { a2(a) {
if (typeof a == "string") return J.ar.prototype if (typeof a == "string") return J.ar.prototype
if (a == null) return a if (a == null) return a
if (!(a instanceof P.m)) return J.av.prototype if (!(a instanceof P.Object)) return J.av.prototype
return a return a
}, },
aB(a) { aB(a) {
@ -3383,7 +3383,7 @@
if (typeof a == "function") return J.ad.prototype if (typeof a == "function") return J.ad.prototype
return a return a
} }
if (a instanceof P.m) return a if (a instanceof P.Object) return a
return J.hl(a) return J.hl(a)
}, },
eb(a, b) { eb(a, b) {
@ -3502,7 +3502,7 @@
ef(a) { ef(a) {
return J.a2(a).dF(a) return J.a2(a).dF(a)
}, },
I: function I() { }, Interceptor: function I() { },
cW: function cW() { }, cW: function cW() { },
bQ: function bQ() { }, bQ: function bQ() { },
as: function as() { }, as: function as() { },
@ -3515,7 +3515,7 @@
eE: function eE(a) { eE: function eE(a) {
this.$ti = a this.$ti = a
}, },
bB: function bB(a, b) { ArrayIterator: function ArrayIterator(a, b) {
var _ = this var _ = this
_.a = a _.a = a
_.b = b _.b = b
@ -5095,7 +5095,7 @@
r: function r() { }, r: function r() { },
cV: function cV() { }, cV: function cV() { },
u: function u() { }, u: function u() { },
m: function m() { }, Object: function m() { },
dZ: function dZ() { }, dZ: function dZ() { },
bh: function bh(a) { bh: function bh(a) {
this.a = a this.a = a
@ -5176,13 +5176,13 @@
} }
return s return s
}, },
hZ(a) { hZ(object) {
if (a == null || typeof a == "string" || typeof a == "number" || typeof a == "boolean") return a if (object == null || typeof object == "string" || typeof object == "number" || typeof object == "boolean") return object
else if (a instanceof Object && H.jR(a)) return a else if (object instanceof Object && H.jR(object)) return object
else if (a instanceof Object && t.f.b(a)) return a else if (object instanceof Object && t.f.b(object)) return object
else if (a instanceof Date) return P.iR(a.getTime(), !1) else if (object instanceof Date) return P.iR(object.getTime(), !1)
else if (a.constructor === $.iw()) return a.o else if (object.constructor === $.iw()) return object.o
else return P.jJ(a) else return P.jJ(object)
}, },
jJ(a) { jJ(a) {
if (typeof a == "function") return P.i1(a, $.hB(), new P.hf()) if (typeof a == "function") return P.i1(a, $.hB(), new P.hf())
@ -5664,8 +5664,8 @@
var w = [B, C, D, E, F, G, H, J, K, M, N, O, P, Q, S, T, V, W, X, Y] var w = [B, C, D, E, F, G, H, J, K, M, N, O, P, Q, S, T, V, W, X, Y]
hunkHelpers.setFunctionNamesIfNecessary(w) hunkHelpers.setFunctionNamesIfNecessary(w)
var $ = {} var $ = {}
H.hN.prototype = {} H.Js_Const.prototype = {}
J.I.prototype = { J.Interceptor.prototype = {
a_(a, b) { a_(a, b) {
return a === b return a === b
}, },
@ -5816,7 +5816,7 @@
return this.al(a, !0) return this.al(a, !0)
}, },
gB(a) { gB(a) {
return new J.bB(a, a.length) return new J.ArrayIterator(a, a.length)
}, },
gF(a) { gF(a) {
return H.di(a) return H.di(a)
@ -5842,7 +5842,7 @@
$ii: 1 $ii: 1
} }
J.eE.prototype = {} J.eE.prototype = {}
J.bB.prototype = { J.ArrayIterator.prototype = {
gt() { gt() {
return this.d return this.d
}, },
@ -7876,7 +7876,7 @@
s = s.gB(s) s = s.gB(s)
} else { } else {
s = s.ag() s = s.ag()
s = new J.bB(s, s.length) s = new J.ArrayIterator(s, s.length)
} }
return s return s
}, },
@ -8506,13 +8506,13 @@
P.cV.prototype = {} P.cV.prototype = {}
P.u.prototype = { P.u.prototype = {
gF(a) { gF(a) {
return P.m.prototype.gF.call(this, this) return P.Object.prototype.gF.call(this, this)
}, },
j(a) { j(a) {
return "null" return "null"
} }
} }
P.m.prototype = { P.Object.prototype = {
$im: 1, $im: 1,
a_(a, b) { a_(a, b) {
return this === b return this === b
@ -10703,7 +10703,7 @@
} }
Y.dm.prototype = {}; Y.dm.prototype = {};
(function aliases() { (function aliases() {
var s = J.I.prototype var s = J.Interceptor.prototype
s.bN = s.j s.bN = s.j
s.bM = s.aq s.bM = s.aq
s = J.as.prototype s = J.as.prototype
@ -10712,7 +10712,7 @@
s.bS = s.bL s.bS = s.bL
s = P.r.prototype s = P.r.prototype
s.bO = s.as s.bO = s.as
s = P.m.prototype s = P.Object.prototype
s.bT = s.j s.bT = s.j
s = W.o.prototype s = W.o.prototype
s.at = s.U s.at = s.U
@ -10763,9 +10763,9 @@
var s = hunkHelpers.mixin, var s = hunkHelpers.mixin,
r = hunkHelpers.inherit, r = hunkHelpers.inherit,
q = hunkHelpers.inheritMany q = hunkHelpers.inheritMany
r(P.m, null) r(P.Object, null)
q(P.m, [H.hN, J.I, J.bB, P.n, P.cg, H.aG, P.r, H.a5, P.cV, H.bJ, H.dC, H.bi, P.bV, H.bD, H.eD, H.fc, H.eY, H.bI, H.cp, H.fM, P.bb, H.eI, H.d1, H.b8, H.ch, H.dH, H.dv, H.fT, H.a1, H.dP, H.e2, P.fY, P.dI, P.cE, P.dL, P.bs, P.v, P.dJ, P.c6, P.dt, P.du, P.dX, P.h5, P.cu, P.fL, P.dS, P.k, P.e4, P.c4, P.cK, P.fr, P.fq, P.h2, P.h1, P.b2, P.b3, P.df, P.c5, P.fw, P.ey, P.u, P.dZ, P.bh, W.ep, W.hL, W.bt, W.bM, W.c0, W.co, W.e0, W.bK, W.fs, W.fQ, W.e5, P.fU, P.fk, P.W, P.eX, P.fJ, O.b6, O.eA, O.cS, O.ei, O.ej, O.en, O.el, O.fb, O.f5, Y.ag, N.cP, N.f0, S.dd, G.cY, G.d3, G.cH, Q.dV, V.dk, V.eC, D.f2, D.f1, Y.dm]) q(P.Object, [H.Js_Const, J.Interceptor, J.ArrayIterator, P.n, P.cg, H.aG, P.r, H.a5, P.cV, H.bJ, H.dC, H.bi, P.bV, H.bD, H.eD, H.fc, H.eY, H.bI, H.cp, H.fM, P.bb, H.eI, H.d1, H.b8, H.ch, H.dH, H.dv, H.fT, H.a1, H.dP, H.e2, P.fY, P.dI, P.cE, P.dL, P.bs, P.v, P.dJ, P.c6, P.dt, P.du, P.dX, P.h5, P.cu, P.fL, P.dS, P.k, P.e4, P.c4, P.cK, P.fr, P.fq, P.h2, P.h1, P.b2, P.b3, P.df, P.c5, P.fw, P.ey, P.u, P.dZ, P.bh, W.ep, W.hL, W.bt, W.bM, W.c0, W.co, W.e0, W.bK, W.fs, W.fQ, W.e5, P.fU, P.fk, P.W, P.eX, P.fJ, O.b6, O.eA, O.cS, O.ei, O.ej, O.en, O.el, O.fb, O.f5, Y.ag, N.cP, N.f0, S.dd, G.cY, G.d3, G.cH, Q.dV, V.dk, V.eC, D.f2, D.f1, Y.dm])
q(J.I, [J.cW, J.bQ, J.as, J.p, J.aJ, J.ar, H.bX, H.A, W.cQ, W.aE, W.eo, W.dM, W.er, W.es, W.c, W.bL, W.d4, W.dT, W.dW, W.e6, P.bR]) q(J.Interceptor, [J.cW, J.bQ, J.as, J.p, J.aJ, J.ar, H.bX, H.A, W.cQ, W.aE, W.eo, W.dM, W.er, W.es, W.c, W.bL, W.d4, W.dT, W.dW, W.e6, P.bR])
q(J.as, [J.dh, J.av, J.ad]) q(J.as, [J.dh, J.av, J.ad])
r(J.eE, J.p) r(J.eE, J.p)
q(J.aJ, [J.bP, J.cX]) q(J.aJ, [J.bP, J.cX])
@ -10973,7 +10973,7 @@
C.o = W.aF.prototype C.o = W.aF.prototype
C.d = W.b1.prototype C.d = W.b1.prototype
C.v = W.aH.prototype C.v = W.aH.prototype
C.R = J.I.prototype C.R = J.Interceptor.prototype
C.c = J.p.prototype C.c = J.p.prototype
C.a = J.bP.prototype C.a = J.bP.prototype
C.j = J.aJ.prototype C.j = J.aJ.prototype
@ -11658,17 +11658,17 @@
v.dispatchPropertyName = v.getIsolateTag("dispatch_record") v.dispatchPropertyName = v.getIsolateTag("dispatch_record")
}() }()
hunkHelpers.setOrUpdateInterceptorsByTag({ hunkHelpers.setOrUpdateInterceptorsByTag({
DOMError: J.I, DOMError: J.Interceptor,
DOMImplementation: J.I, DOMImplementation: J.Interceptor,
MediaError: J.I, MediaError: J.Interceptor,
Navigator: J.I, Navigator: J.Interceptor,
NavigatorConcurrentHardware: J.I, NavigatorConcurrentHardware: J.Interceptor,
NavigatorUserMediaError: J.I, NavigatorUserMediaError: J.Interceptor,
OverconstrainedError: J.I, OverconstrainedError: J.Interceptor,
PositionError: J.I, PositionError: J.Interceptor,
GeolocationPositionError: J.I, GeolocationPositionError: J.Interceptor,
Range: J.I, Range: J.Interceptor,
SQLError: J.I, SQLError: J.Interceptor,
ArrayBuffer: H.bX, ArrayBuffer: H.bX,
DataView: H.A, DataView: H.A,
ArrayBufferView: H.A, ArrayBufferView: H.A,
@ -12287,9 +12287,8 @@
for (var r = 0; r < s.length; ++r) s[r].addEventListener("load", onLoad, false) for (var r = 0; r < s.length; ++r) s[r].addEventListener("load", onLoad, false)
})(function (a) { })(function (a) {
v.currentScript = a v.currentScript = a
var s = E.main_program var main_func = E.main_program
if (typeof dartMainRunner === "function") dartMainRunner(s, []) main_func()
else s([])
}) })
})() })()
//# sourceMappingURL=index.dart.js.map //# sourceMappingURL=index.dart.js.map

781
out.js

File diff suppressed because one or more lines are too long

View File

@ -3,12 +3,21 @@ import 'dart:js' as Js;
import 'dart:html'; import 'dart:html';
void main() { void main() {
// Find an element by id (an-id).
Element idElement = querySelector('#an-id')!;
// Find an element by class (a-class).
Element classElement = querySelector('.a-class')!;
// Find all elements by tag (<div>).
List<Element> divElements = querySelectorAll('div');
print("Hello, World!"); print("Hello, World!");
var a = "Hello, World!"; var a = "Hello, World!";
for (var i = 0; i < 10; i++) { for (var i = 0; i < 10; i++) {
a += " " + i.toString(); a += " " + i.toString();
} }
var b = 12242424242424; int b = 124242424;
for (var i = 0; i < 10; i++) { for (var i = 0; i < 10; i++) {
b += b * i; b += b * i;
} }