Fix access to documentElement

This commit is contained in:
David Botton 2021-01-21 21:59:30 -05:00
parent c1c08db9b3
commit ef7f0a5b52
3 changed files with 9 additions and 5 deletions

View file

@ -32,12 +32,12 @@
"Construct a new clog-document. (Private)"
(make-instance
'clog-document :connection-id connection-id :html-id "document"
:document-element (make-instance 'clog-obj
:document-element (make-instance 'clog-element
:connection-id connection-id
:html-id "head")
:head-element (make-instance 'clog-obj
:html-id "documentElement")
:head-element (make-instance 'clog-element
:connection-id connection-id
:html-id "documentElement")))
:html-id "head")))
;;;;;;;;;;;;;;;;;;;;;;
;; document-element ;;
;;;;;;;;;;;;;;;;;;;;;;
@ -65,7 +65,7 @@
(defgeneric set-body (clog-document body)
(:documentation "Set the body slot after creating the
clog-documentation object. (Private)"))
clog-document object. (Private)"))
(defmethod set-body ((obj clog-document) body)
(setf (slot-value obj 'body-element) body))

View file

@ -74,6 +74,8 @@ $( document ).ready(function() {
var r = /[?&]?([^=]+)=([^&]*)/g;
clog['body']=document.body;
clog['head']=document.head;
clog['documentElement']=document.documentElement;
clog['window']=window;
clog['navigator']=navigator;
clog['document']=window.document;

View file

@ -74,6 +74,8 @@ $( document ).ready(function() {
var r = /[?&]?([^=]+)=([^&]*)/g;
clog['body']=document.body;
clog['head']=document.head;
clog['documentElement']=document.documentElement;
clog['window']=window;
clog['navigator']=navigator;
clog['document']=window.document;