Extended DESTRUCTURING-BIND to allow NIL bindings to indicate a place should be ignor...
[clinton/parenscript.git] / src / js-dom-symbol-exports.lisp
1 (in-package "COMMON-LISP")
2
3 ;; These are convenience packages that export JS and browser DOM
4 ;; symbols. If you :use the packages in a package FOO and then
5 ;; obfuscate FOO, it will prevent the JS symbols from getting
6 ;; mangled.
7
8 ;; For most web development tasks, you want to import PS-JS-SYMBOLS,
9 ;; PS-WINDOW-WD-SYMBOLS (which includes DOM level 2 and the w3c Window
10 ;; working draft), and possibly the PS-DOM-NONSTANDARD-SYMBOLS.
11
12 (defpackage "PS-JS-SYMBOLS"
13 (:export
14 #:to-fixed
15 #:encode-u-r-i-component
16 #:size
17 #:*array
18 #:*date
19 #:get-time
20 #:arguments
21 #:join
22 #:prototype
23 #:slice
24 #:call
25 ))
26
27 (defpackage "PS-DOM1-SYMBOLS"
28 (:use "COMMON-LISP") ;; ensure we don't have naming collisions w/symbols defined in CL
29 (:export
30 ;;; Core
31 ;; DOMImplementation
32 ; methods
33 #:has-feature
34
35 ;; document interface
36 ; attributes
37 #:doctype
38 #:implementation
39 #:document-element
40 ; methods
41 #:create-element
42 #:create-document-fragment
43 #:create-text-node
44 #:create-comment
45 #:create-C-D-A-T-A-Section
46 #:create-processing-instruction
47 #:create-attribute
48 #:create-entity-reference
49 #:get-elements-by-tag-name
50
51 ;; node interface
52 ; attributes
53 #:node-name
54 #:node-value
55 #:node-type
56 #:parent-node
57 #:child-nodes
58 #:first-child
59 #:last-child
60 #:previous-sibling
61 #:next-sibling
62 #:attributes
63 #:owner-document
64 ; methods
65 #:insert-before
66 #:replace-child
67 #:remove-child
68 #:append-child
69 #:has-child-nodes
70 #:clone-node
71
72 ;; nodelist interface
73 ; methods
74 #:item
75 ; attributes
76 #:length
77
78 ;; namednodemap
79 ; methods
80 #:get-named-item
81 #:set-named-item
82 #:remove-named-item
83 #:item
84 ; attributes
85 #:length
86
87 ;; characterdata
88 ; attributes
89 #:data
90 #:length
91 ; methods
92 #:substring-data
93 #:append-data
94 #:insert-data
95 #:delete-data
96 #:replace-data
97
98 ;; attr
99 ; attributes
100 #:name
101 #:specified
102 #:value
103
104 ;; element
105 ; attributes
106 #:tag-name
107 ; methods
108 #:get-attribute
109 #:set-attribute
110 #:remove-attribute
111 #:get-attribute-node
112 #:set-attribute-node
113 #:remove-attribute-node
114 #:get-elements-by-tag-name
115 #:normalize
116
117 ;; text
118 ; methods
119 #:split-text
120
121 ;;; Level 1 extended interfaces (XML)
122 ;; DocumentType
123 ; attributes
124 #:name
125 #:entities
126 #:notations
127
128 ;; notation
129 ; attributes
130 #:public-id
131 #:system-id
132
133 ;; entity
134 ; attrs
135 #:public-id
136 #:system-id
137 #:notation-name
138
139 ;; processing instruction
140 ; attrs
141 #:target
142 #:data
143
144 ;;; HTML
145 ;; HTMLcollection/live NodeList
146 ; attributes
147 #:length
148 ; methods
149 #:item
150 #:named-item
151
152 ;; document
153 #:document
154 ; attributes
155 #:title
156 #:referrer
157 #:domain
158 #:*URL*
159 #:body
160 #:images
161 #:applets
162 #:links
163 #:forms
164 #:anchors
165 #:cookie
166 ; methods
167 #:open
168 #:close
169 #:write
170 #:writeln
171 #:get-element-by-id
172 #:get-elements-by-name
173
174 ;; generic HTML element
175 ; attributes
176 #:id
177 #:title
178 #:lang
179 #:dir
180 #:class-name
181
182 ;; HTML document root
183 ; attributes
184 #:version
185
186 ;; head
187 ; attributes
188 #:profile
189
190 ;; link
191 ; attributes
192 #:disabled
193 #:charset
194 #:href
195 #:hreflang
196 #:media
197 #:rel
198 #:rev
199 #:target
200 #:type
201
202 ;; title
203 ; attrs
204 #:text
205
206 ;; meta
207 ; attrs
208 #:content
209 #:http-equiv
210 #:name
211 #:scheme
212
213 ;; base
214 ; attrs
215 #:href
216 #:target
217
218 ;; isindex
219 ; attrs
220 #:form
221 #:prompt
222
223 ;; style
224 ; attrs
225 #:disabled
226 #:media
227 #:type
228
229 ;; body
230 ; attrs
231 #:a-link
232 #:background
233 #:bg-color
234 #:link
235 #:text
236 #:v-link
237
238 ;; form
239 ; attrs
240 #:elements
241 #:length
242 #:name
243 #:accept-charset
244 #:action
245 #:enctype
246 #:method
247 #:target
248 ; methods
249 #:submit
250 #:reset
251
252 ;; select
253 ; attrs
254 #:type
255 #:selected-index
256 #:value
257 #:length
258 #:form
259 #:options
260 #:disabled
261 #:multiple
262 #:name
263 #:size
264 #:tab-index
265 ; methods
266 #:add
267 #:remove
268 #:blur
269 #:focus
270
271 ;; optgroup
272 ; attrs
273 #:disabled
274 #:label
275
276 ;; option
277 ; attrs
278 #:form
279 #:default-selected
280 #:text
281 #:index
282 #:disabled
283 #:label
284 #:selected
285 #:value
286
287 ;; input
288 ; attrs
289 #:default-value
290 #:default-checked
291 #:form
292 #:accept
293 #:access-key
294 #:align
295 #:alt
296 #:checked
297 #:disabled
298 #:max-length
299 #:name
300 #:read-only
301 #:size
302 #:src
303 #:tab-index
304 #:type
305 #:use-map
306 #:value
307 ; methods
308 #:blur
309 #:focus
310 #:select
311 #:click
312
313 ;; textarea
314 ; attrs
315 #:default-value
316 #:form
317 #:access-key
318 #:cols
319 #:disabled
320 #:name
321 #:read-only
322 #:rows
323 #:tab-index
324 #:type
325 #:value
326 ; methods
327 #:blur
328 #:focus
329 #:select
330
331 ;; button
332 ; attrs
333 #:form
334 #:access-key
335 #:disabled
336 #:name
337 #:tab-index
338 #:type
339 #:value
340
341 ;; label
342 ; attrs
343 #:form
344 #:access-key
345 #:html-for
346
347 ;; fieldset
348 ; attrs
349 #:form
350
351 ;; legend
352 ; attrs
353 #:form
354 #:access-key
355 #:align
356
357 ;; ul
358 ; attrs
359 #:compact
360 #:type
361
362 ;; ol
363 ; attrs
364 #:compact
365 #:start
366 #:type
367
368 ;; dl, dir and menu
369 ; attrs
370 #:compact
371
372 ;; li
373 ; attrs
374 #:type
375 #:value
376
377 ;; blockquote and q
378 ; attrs
379 #:cite
380
381 ;; div, p, and h1/h2/hn
382 ; attrs
383 #:align
384
385 ;; pre
386 ; attrs
387 #:width
388
389 ;; br
390 ; attrs
391 #:clear
392
393 ;; basefont, font
394 ; attrs
395 #:color
396 #:face
397 #:size
398
399 ;; hr
400 ; attrs
401 #:align
402 #:no-shade
403 #:size
404 #:width
405
406 ;; ins and del
407 ; attrs
408 #:cite
409 #:date-time
410
411 ;; a
412 ; attrs
413 #:access-key
414 #:charset
415 #:coords
416 #:href
417 #:hreflang
418 #:name
419 #:rel
420 #:rev
421 #:shape
422 #:tab-index
423 #:target
424 #:type
425 ; methods
426 #:blur
427 #:focus
428
429 ;; img
430 ; attrs
431 #:low-src
432 #:name
433 #:align
434 #:alt
435 #:border
436 #:height
437 #:hspace
438 #:is-map
439 #:long-desc
440 #:src
441 #:use-map
442 #:vspace
443 #:width
444
445 ;; object
446 ; attrs
447 #:form
448 #:code
449 #:align
450 #:archive
451 #:border
452 #:code-base
453 #:code-type
454 #:data
455 #:declare
456 #:height
457 #:hspace
458 #:name
459 #:standby
460 #:tab-index
461 #:type
462 #:use-map
463 #:vspace
464 #:width
465
466 ;; param
467 ; attrs
468 #:name
469 #:type
470 #:value
471 #:value-type
472
473 ;; applet
474 ; attrs
475 #:align
476 #:alt
477 #:archive
478 #:code
479 #:code-base
480 #:height
481 #:hspace
482 #:name
483 #:object
484 #:vspace
485 #:width
486
487 ;; map
488 ; attrs
489 #:areas
490 #:name
491
492 ;; area
493 ; attrs
494 #:access-key
495 #:alt
496 #:coords
497 #:href
498 #:no-href
499 #:shape
500 #:tab-index
501 #:target
502
503 ;; script
504 ; attrs
505 #:text
506 #:html-for
507 #:event
508 #:charset
509 #:defer
510 #:src
511 #:type
512
513 ;; table
514 ; attrs
515 #:caption
516 #:t-head
517 #:t-foot
518 #:rows
519 #:t-bodies
520 #:align
521 #:bg-color
522 #:border
523 #:cell-padding
524 #:cell-spacing
525 #:frame
526 #:rules
527 #:summary
528 #:width
529 ; methods
530 #:create-t-head
531 #:delete-t-head
532 #:create-t-foot
533 #:delete-t-foot
534 #:create-caption
535 #:delete-caption
536 #:insert-row
537 #:delete-row
538
539 ;; caption
540 ; attrs
541 #:align
542
543 ;; col
544 ; attrs
545 #:align
546 #:ch
547 #:ch-off
548 #:span
549 #:v-align
550 #:width
551
552 ;; thead, tfoot, tbody
553 ; attrs
554 #:align
555 #:ch
556 #:ch-off
557 #:v-align
558 #:rows
559 ; methods
560 #:insert-row
561 #:delete-row
562
563 ;; tr
564 ; attrs
565 #:row-index
566 #:section-row-index
567 #:cells
568 #:align
569 #:bg-color
570 #:ch
571 #:ch-off
572 #:v-align
573 ; methods
574 #:insert-cell
575 #:delete-cell
576
577 ;; th and td
578 ; attrs
579 #:cell-index
580 #:abbr
581 #:align
582 #:axis
583 #:bg-color
584 #:ch
585 #:ch-off
586 #:col-span
587 #:headers
588 #:height
589 #:no-wrap
590 #:row-span
591 #:scope
592 #:v-align
593 #:width
594
595 ;; frameset
596 ; attrs
597 #:cols
598 #:rows
599
600 ;; frame
601 ; attrs
602 #:frame-border
603 #:long-desc
604 #:margin-height
605 #:margin-width
606 #:name
607 #:no-resize
608 #:scrolling
609 #:src
610
611 ;; iframe
612 ; attrs
613 #:align
614 #:frame-border
615 #:height
616 #:long-desc
617 #:margin-height
618 #:margin-width
619 #:name
620 #:scrolling
621 #:src
622 #:width))
623
624 (defpackage "PS-DOM2-SYMBOLS"
625 (:use "PS-DOM1-SYMBOLS" "COMMON-LISP")
626 (:export
627 ;;; Core
628 ;; DOMImplementation
629 ; methods
630 #:create-document
631 #:create-document-type
632
633 ;; document interface
634 ; methods
635 #:create-attribute-n-s
636 #:create-element-n-s
637 #:get-element-by-id
638 #:get-elements-by-tag-name-n-s
639 #:import-node
640
641 ;; node interface
642 ; attributes
643 #:local-name
644 #:namespace-u-r-i
645 #:prefix
646 ; methods
647 #:is-supported
648
649 ;; named node map
650 ; methods
651 #:get-named-item-n-s
652 #:remove-named-item-n-s
653 #:set-named-item-n-s
654
655 ;; element interface
656 ; methods
657 #:get-attribute-n-s
658 #:get-attribute-node-n-s
659 #:get-elements-by-tag-name-n-s
660 #:has-attribute-n-s
661 #:remove-attribute-n-s
662 #:set-attribute-n-s
663 #:set-attribute-node-n-s
664
665 ;;; Level 2 extended interfaces
666 ;; document type
667 ; attrs
668 #:internal-subset
669 #:public-id
670 #:system-id
671
672 ;;; Level 2 HTML
673 ;; object, frame, iframe
674 ; attr
675 #:content-document
676
677 ;;; Stylesheets
678 ;; stylesheet
679 ; attrs
680 #:disabled
681 #:href
682 #:media
683 #:owner-node
684 #:parent-style-sheet
685 #:title
686 #:type
687
688 ;; media list
689 ; attrs
690 #:length
691 #:media-text
692 ; methods
693 #:append-medium
694 #:delete-medium
695 #:item
696
697 ;; linkstyle
698 ; attrs
699 #:sheet
700
701 ;; documentstyle
702 ; attrs
703 #:style-sheets
704
705 ;;; CSS
706 ;; css style sheet
707 ; attrs
708 #:css-rules
709 #:owner-rule
710 ; methods
711 #:delete-rule
712 #:insert-rule
713
714 ;; css rule
715 ; attrs
716 #:css-text
717 #:parent-rule
718 #:parent-style-sheet
719 #:type
720
721 ;; css style rule
722 ; attrs
723 #:selector-text
724 #:style
725
726 ;; css media rule
727 ; attrs
728 #:css-rules
729 #:media
730 ; methods
731 #:delete-rule
732 #:insert-rule
733
734 ;; css import rule
735 ; attrs
736 #:href
737 #:media
738 #:style-sheet
739
740 ;; css charset rule
741 ; attrs
742 #:encoding
743
744 ;; css style declaration
745 ; attrs
746 #:css-text
747 #:length
748 #:parent-rule
749 ; methods
750 #:get-property-c-s-s-value
751 #:get-property-priority
752 #:get-property-value
753 #:item
754 #:remove-property
755 #:set-property
756
757 ;; css value
758 ; attrs
759 #:css-text
760 #:css-value-type
761
762 ;; css primitive value
763 ; attrs
764 #:primitive-type
765 ; methods
766 #:get-counter-value
767 #:get-float-value
768 #:get-r-g-b-color-value
769 #:get-rect-value
770 #:get-string-value
771 #:set-float-value
772 #:set-string-value
773
774 ;; rgb color
775 ; attrs
776 #:blue
777 #:green
778 #:red
779
780 ;; rectangle
781 ; attrs
782 #:bottom
783 #:left
784 #:right
785 #:top
786
787 ;; counter
788 ; attrs
789 #:identifier
790 #:list-style
791 #:separator
792
793 ;; css views
794 ; methods
795 #:get-computed-style
796
797 ;; document css
798 ; methods
799 #:get-override-style
800
801 ;; css stylesheets
802 ; methods
803 #:create-c-s-s-style-sheet
804
805 ;;; CSS 2.0 extended interface
806 ; attributes
807 #:azimuth
808 #:background
809 #:background-attachment
810 #:background-color
811 #:background-image
812 #:background-position
813 #:background-repeat
814 #:border
815 #:border-bottom
816 #:border-bottom-color
817 #:border-bottom-style
818 #:border-bottom-width
819 #:border-collapse
820 #:border-color
821 #:border-left
822 #:border-left-color
823 #:border-left-style
824 #:border-left-width
825 #:border-right
826 #:border-right-color
827 #:border-right-style
828 #:border-right-width
829 #:border-spacing
830 #:border-style
831 #:border-top
832 #:border-top-color
833 #:border-top-style
834 #:border-top-width
835 #:border-width
836 #:bottom
837 #:caption-side
838 #:clear
839 #:clip
840 #:color
841 #:content
842 #:counter-increment
843 #:counter-reset
844 #:css-float
845 #:cue
846 #:cue-after
847 #:cue-before
848 #:cursor
849 #:direction
850 #:display
851 #:elevation
852 #:empty-cells
853 #:font
854 #:font-family
855 #:font-size
856 #:font-size-adjust
857 #:font-stretch
858 #:font-style
859 #:font-variant
860 #:font-weight
861 #:height
862 #:left
863 #:letter-spacing
864 #:line-height
865 #:list-style
866 #:list-style-image
867 #:list-style-position
868 #:list-style-type
869 #:margin
870 #:margin-bottom
871 #:margin-left
872 #:margin-right
873 #:margin-top
874 #:marker-offset
875 #:marks
876 #:max-height
877 #:max-width
878 #:min-height
879 #:min-width
880 #:orphans
881 #:outline
882 #:outline-color
883 #:outline-style
884 #:outline-width
885 #:overflow
886 #:padding
887 #:padding-bottom
888 #:padding-left
889 #:padding-right
890 #:padding-top
891 #:page
892 #:page-break-after
893 #:page-break-before
894 #:page-break-inside
895 #:pause
896 #:pause-after
897 #:pause-before
898 #:pitch
899 #:pitch-range
900 #:play-during
901 ;; #:position in CL
902 #:quotes
903 #:richness
904 #:right
905 #:size
906 #:speak
907 #:speak-header
908 #:speak-numeral
909 #:speak-punctuation
910 #:speech-rate
911 #:stress
912 #:table-layout
913 #:text-align
914 #:text-decoration
915 #:text-indent
916 #:text-shadow
917 #:text-transform
918 #:top
919 #:unicode-bidi
920 #:vertical-align
921 #:visibility
922 #:voice-family
923 #:volume
924 #:white-space
925 #:widows
926 #:width
927 #:word-spacing
928 #:z-index
929
930 ;;; Events
931 ;; event target interface
932 ; methods
933 #:add-event-listener
934 #:dispatch-event
935 #:remove-event-listener
936
937 ;; event listener interface
938 ; methods
939 #:handle-event
940
941 ;; Event
942 ; attributes
943 #:bubbles
944 #:cancelable
945 #:current-target
946 #:event-phase
947 #:target
948 #:time-stamp
949 #:type
950 ; methods
951 #:init-event
952 #:prevent-default
953 #:stop-propagation
954
955 ;; document event interface
956 ; methods
957 #:create-event
958
959 ;; UIEvent
960 ; attributes
961 #:detail
962 #:view
963 ; methods
964 #:init-u-i-event
965
966 ;; MouseEvent
967 ; attributes
968 #:alt-key
969 #:button
970 #:client-x
971 #:client-y
972 #:ctrl-key
973 #:meta-key
974 #:related-target
975 #:screen-x
976 #:screen-y
977 #:shift-key
978 ; methods
979 #:init-mouse-event
980
981 ;; mutation event interface
982 ; attributes
983 #:attr-change
984 #:attr-name
985 #:new-value
986 #:prev-value
987 #:related-node
988 ; methods
989 #:init-mutation-event
990 )
991 )
992
993 (defpackage "PS-WINDOW-WD-SYMBOLS"
994 ;;; The window object (w3c working draft)
995 (:use "PS-DOM2-SYMBOLS" "COMMON-LISP")
996 (:export
997 ; attributes
998 #:window
999 #:self
1000 #:location
1001
1002 ;; location interface
1003 ; attrs
1004 #:href
1005 #:hash
1006 #:host
1007 #:hostname
1008 ;; #:pathname in CL
1009 #:port
1010 #:protocol
1011 ;; #:search in CL
1012 ; methods
1013 ;; #:replace in CL
1014 #:reload
1015
1016 ;; window interface
1017 ; attrs
1018 #:parent
1019 #:top
1020 #:name
1021 #:frame-element
1022
1023 ;; timers
1024 ; methods
1025 #:set-timeout
1026 #:set-interval
1027 #:clear-timeout
1028 #:clear-interval
1029 )
1030 )
1031
1032 (defpackage "PS-DOM-NONSTANDARD-SYMBOLS"
1033 ;;; Non-standard (incl. DOM level 0) but useful
1034 (:export
1035 #:inner-h-t-m-l
1036 #:onload
1037
1038 #:offset-left
1039 #:offset-top
1040 #:offset-height
1041 #:offset-width
1042
1043 #:offset-parent
1044
1045 #:scroll-left
1046 #:scroll-top
1047 #:scroll-width
1048 #:scroll-height
1049
1050 #:page-x-offset
1051 #:page-y-offset
1052
1053 #:client-height
1054 #:client-width
1055 ))
1056