Commit Graph

115 Commits

Author SHA1 Message Date
konsumlamm
9997b42c35 Use importjs (#17422) 2021-03-19 14:22:48 -07:00
Juan Carlos
9e1a2e9b63 improve jsconsole (#17414)
* Add jsconsole.dir

* Update lib/js/jsconsole.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-19 07:15:37 +01:00
Juan Carlos
cfe2f126e5 Documentation only jsconsole (#17384)
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-16 13:16:20 -07:00
Juan Carlos
0234b479ab Add Debug breakpoints support (#17295)
* Add Debug breakpoints support

* Add Debug breakpoints support
2021-03-08 09:32:49 +01:00
Timothee Cour
a66637bda4 followup #16871 asyncjs.then: allow pipelining procs returning futures (#17189)
* followup #16871 asyncjs.then: allow pipelining procs returning futures
* rename test files where they belong
* fix tests
* tests for then with `onReject` callback
* rename test file containing fail to avoid messing with grep
* address comments
* cleanup
* un-disable 1 test
2021-03-04 14:00:04 +01:00
flywind
ec068a2687 fix #17177 (#17243)
* remove unnecessary when statement

* remove outdated codes

* fix #17177

* add testcase
2021-03-03 11:57:34 +01:00
Timothee Cour
b725e0ed4d make jsconsole.assertion errors less confusing in logs (#17179)
* make jsconsole.assertion errors less confusing in logs

* address comments

* fixup
2021-02-25 14:02:00 +01:00
Timothee Cour
a4e6b242d5 asyncjs: add then, catch for promise pipelining (#16871)
* asyncjs: add then
* improve tests, changelog, API
* fix cryptic windows error: The parameter is incorrect
* address comments
2021-02-24 21:03:21 +01:00
Antonis Geralis
9ded85e1b4 add createElementNS, will hopefully fix svgs for karax (#16938) 2021-02-05 00:33:27 +01:00
Antonis Geralis
2c70734913 Add StorageEvent and correct Storage object (#16865)
There is no `LocalStorage` type, it's `Storage`
2021-01-29 20:37:31 +01:00
Timothee Cour
18e14f5920 js: improve tests + some docs (#16727)
* js: improve tests

* _

* _

* _

* fixup
2021-01-16 12:08:40 +01:00
flywind
fe20492f05 clean up the docs of some modules under lib/js (#16579) 2021-01-04 19:54:33 +01:00
Andreas Rumpf
73a8b950cb big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
2021-01-02 07:30:39 +01:00
Juan Carlos
b8658a3e24 Add assertions for jsconsole (#16460) 2020-12-30 15:10:50 +01:00
ee7
297c8e403d styleCheck: Fix some inconsistent identifiers (#16177) 2020-12-21 09:41:56 -08:00
Elliot Waite
f3d57761ab Fix broken links in docs (#16336)
* Fix broken links in docs

* Fix rand HSlice links
2020-12-14 20:13:12 +01:00
Timothee Cour
0b73106ccf add math.isNaN (#16179)
* add math.isNaN
* isNaN now works with --passc:-ffast-math; tests
* Update lib/pure/math.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-12-11 11:01:43 +01:00
flywind
148d614dff js module also uses runnableExamples (#16229) 2020-12-02 16:24:59 +01:00
flywind
70a1c42542 add ** to jsffi (#16141)
* fix rope index

* add testcase

* fix ropes format

* add `**` to jsffi

* add testcase

* changelog

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-26 20:30:19 +01:00
treeform
83432aecfc Add documentElement to Document. (#15943) 2020-11-13 08:12:03 +01:00
Bung
bc007a3cd3 add parent property to window in dom.nim (#15922) 2020-11-12 12:36:42 +01:00
cooldome
341be0b61c proc params as syms (#15332)
* proc params are now syms

* Fix typesrenderer

* Add testcase for disrupteks issue

* fix test

* Trigger build

* Trigger build

* Trigger build

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-09-16 17:25:24 +01:00
Juan Carlos
a667475aaf dom.Navigator add missing attributes (#15310)
* Add missing attributes and methods to dom.Navigator

* Add missing attributes and methods to dom.Navigator

* Add missing attributes and methods to dom.Navigator
2020-09-14 08:58:21 +02:00
Juan Carlos
c4e03b540e Fix #15183 (#15300) 2020-09-11 08:57:57 +02:00
Miran
4b93c61f0d jsre: try to fix nightlies (#15057) 2020-07-24 21:15:20 +02:00
Bung
64d629c617 Shadow Dom apis (#14979)
* shadow dom api

* fix typos

* host to Element type

* fix code style

* move elementsFromPoint to dom_extensions.nim
2020-07-21 19:11:12 +02:00
Bung
f999f916f3 add missing props,procs (#14978) 2020-07-14 13:53:41 +02:00
treeform
399b2e3134 Add missing dom.nim things (#14944) 2020-07-09 09:18:27 +02:00
Juan Carlos
4f6acf24ff Add jsre (#14870) 2020-07-03 20:13:10 +02:00
Juan Carlos
04deb6c942 Clean out dom (#14855)
* Clean out dom

* Clean out dom
2020-06-30 10:08:16 +02:00
treeform
f926dc53f1 Add all missing css properties to dom.nim. (#14825)
* Add all missing css properties

* remove extra space
2020-06-26 19:15:21 +01:00
treeform
baa80ca9d4 Add hasAttribute method to dom.nim. (#14814)
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttribute
2020-06-25 14:45:37 -07:00
treeform
1ffe113450 Export fields from the Selection object. (#14752)
See: https://developer.mozilla.org/en-US/docs/Web/API/Selection
2020-06-21 20:41:24 +02:00
treeform
ca71a60ff6 Add css white-space property to dom.nim. (#14743)
https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
2020-06-21 19:25:29 +02:00
treeform
acae3b02c7 Add clipPath to dom.nim. (#14435)
Just adds a single new css atribute, see: https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path .
2020-05-24 07:32:24 +02:00
Mildred Ki'Lya
7b3dcfde20 Add missing attributes and methods to JavaScript DOM (#14428)
- content attribute to access HTML template element:
  https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement/content

- ownerDocument to access the owning document from a DOM Node:
  https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument

- outerHTML to get/set the outer HTML representation of a Node:
  https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument

- createComment() to create comment Nodes:
  https://developer.mozilla.org/en-US/docs/Web/API/Document/createComment

- querySelector() and querySelectorAll() on Nodes:
  https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector
  https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelectorAll
2020-05-22 14:34:20 +02:00
Andreas Rumpf
063229a301 fixes a bug reported in https://forum.nim-lang.org/t/6361 (#14422) 2020-05-21 22:18:58 +02:00
hlaaftana
fbc97e712a move since from inclrtl to std/private/since (#14188)
* move since from inclrtl to std/private/since
* move since import in system below for HCR
2020-05-02 23:51:59 +02:00
cooldome
eaedd0cb94 add FileReader Web API to js dom (#14105)
* add FileReader to js dom
* minor improvement
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-04-27 00:08:11 +02:00
Jae Yang
362c8964bf Fixes #14110 (#14111)
Fixes jsffi usage example in doc
2020-04-25 20:00:24 +02:00
hlaaftana
b2141fc2a1 changed type() to typeof() in docs and error messages (#14084) 2020-04-24 09:22:12 +02:00
treeform
89e6a7ab48 Fix the getSelection method. (#13632) 2020-04-21 14:57:19 +02:00
Timothee Cour
6914de0d8d fix newDomParser (#13981) 2020-04-16 08:59:54 +02:00
Juan Carlos
0a84219b3e Add jsdomparser (#13920)
* Add jsdomparser

* Add jsdomparser

* Add jsdomparser

* https://github.com/nim-lang/Nim/pull/13920#issuecomment-610727142

* https://github.com/nim-lang/Nim/pull/13920#issuecomment-610727142

* https://github.com/nim-lang/Nim/pull/13920#issuecomment-610727142

* https://github.com/nim-lang/Nim/pull/13920#discussion_r405932909

* https://github.com/nim-lang/Nim/pull/13920#discussion_r406502592
2020-04-13 14:07:52 +01:00
Juan Carlos
160d5fe589 Jsconsole update (#12448)
* Improve jsconsole adding the rest of the stable api as documented on the standard at https://developer.mozilla.org/docs/Web/API/Console

* Improve jsconsole, add runnableexamples
* Simplify jsconsole
2020-04-02 08:47:45 +02:00
treeform
f2c7152770 Add more JS stuff to dom.nim (#13483)
* Add more JS stuff to dom.nim

* Make all links to docs doc comments.

* Fix minor textContent * space.

* Remove Selection object.

* More work on docs.

* Fixing links.

* Made the links be "see <docs>".
2020-03-11 23:24:56 +00:00
Jairo
32f0910f11 scrollTop must be settable (#13263)
* scrollTop must be assignable

Make scrollTop settable

* add missing export
2020-01-27 09:14:56 +01:00
Jairo
fb74497c99 Add "origin" to window.location (#13251)
Add "origin" to window location: https://www.w3schools.com/jsref/prop_loc_origin.asp
2020-01-24 20:06:17 +01:00
Jjp137
93461aee34 Fix many broken links
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
2019-10-22 17:59:12 -07:00
Juan Carlos
1ccf1b89c2 Improve jsconsole adding the rest of the stable api as documented on the standard at https://developer.mozilla.org/docs/Web/API/Console (#12440) 2019-10-17 11:37:08 +02:00