Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Derive DOM element tamings from specification data. (issue 6741065)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jas...@gmail.com  
View profile  
 More options Nov 9 2012, 5:35 pm
From: jas...@gmail.com
Date: Fri, 09 Nov 2012 22:35:32 +0000
Local: Fri, Nov 9 2012 5:35 pm
Subject: Re: Derive DOM element tamings from specification data. (issue 6741065)
For fun I ran a check on Chrome using these html4 and html5 defs.

xxx.forEach(function(x) {
   var el = document.createElement(x.key);
   var cand = Object.prototype.toString.call(el);
   if (cand.indexOf(x.interface) == -1) {
     print(x.key + " => " + cand + ", not " + x.interface);
   }

});

 From html4:

APPLET => [object HTMLAppletElement], not HTMLElement
BASEFONT => [object HTMLBaseFontElement], not HTMLElement
DIR => [object HTMLDirectoryElement], not HTMLElement
FONT => [object HTMLFontElement], not HTMLElement
FRAME => [object HTMLFrameElement], not HTMLElement
FRAMESET => [object HTMLFrameSetElement], not HTMLElement
TD => [object HTMLTableCellElement], not HTMLTableDataCellElement
TH => [object HTMLTableCellElement], not HTMLTableHeaderCellElement

 From html5:
COMMAND => [object HTMLElement], not HTMLCommandElement
DATA => [object HTMLUnknownElement], not HTMLElement
DIALOG => [object HTMLUnknownElement], not HTMLDialogElement
TIME => [object HTMLUnknownElement], not HTMLTimeElement

None of these seem significant differences -- they're essentially ways
in which Chrome varies from the html5 spec.

https://codereview.appspot.com/6741065/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jas...@gmail.com  
View profile  
 More options Nov 9 2012, 6:08 pm
From: jas...@gmail.com
Date: Fri, 09 Nov 2012 23:08:54 +0000
Local: Fri, Nov 9 2012 6:08 pm
Subject: Re: Derive DOM element tamings from specification data. (issue 6741065)

https://codereview.appspot.com/6741065/diff/11001/src/com/google/caja...
File src/com/google/caja/plugin/domado.js (right):

https://codereview.appspot.com/6741065/diff/11001/src/com/google/caja...
src/com/google/caja/plugin/domado.js:5900: 'HTMLTableCellElement',
So should this become HTMLTableDataCell now?  How does allDomNodeClasses
interact with the element defs?

https://codereview.appspot.com/6741065/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kpreid.switchb....@gmail.com  
View profile  
 More options Nov 12 2012, 3:29 pm
From: kpreid.switchb....@gmail.com
Date: Mon, 12 Nov 2012 20:29:10 +0000
Local: Mon, Nov 12 2012 3:29 pm
Subject: Re: Derive DOM element tamings from specification data. (issue 6741065)
New snapshot.

https://codereview.appspot.com/6741065/diff/11001/src/com/google/caja...
File src/com/google/caja/plugin/domado.js (right):

https://codereview.appspot.com/6741065/diff/11001/src/com/google/caja...
src/com/google/caja/plugin/domado.js:5900: 'HTMLTableCellElement',
On 2012/11/09 23:08:54, Jasvir wrote:

> So should this become HTMLTableDataCell now?

No. HTMLTableCellElement is the superclass of HTMLTableDataCellElement
and HTMLTableHeaderCellElement.

> How does allDomNodeClasses interact with the element defs?

This *was* a *complete* list of standard classes (it is no longer
complete due to HTML5 etc.); the ones in this list but not otherwise
implemented are made into aliases for HTMLElement.

It occurs to me that we could instead generate this list from all
interfaces mentioned in the schema. Comparison of the results this would
have pointed out a few mistakes in the schema data and Domado; after
fixing those, the only difference that results is that we would lose
HTMLIsIndexElement and HTMLNavElement. Both are not specified by HTML5.

Therefore, I have gone ahead and done so; this list is now gone.

https://codereview.appspot.com/6741065/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jas...@gmail.com  
View profile  
 More options Nov 13 2012, 12:58 pm
From: jas...@gmail.com
Date: Tue, 13 Nov 2012 17:58:08 +0000
Local: Tues, Nov 13 2012 12:58 pm
Subject: Re: Derive DOM element tamings from specification data. (issue 6741065)
With the caveat to doublecheck the use of gOPN, LGTM

https://codereview.appspot.com/6741065/diff/14001/src/com/google/caja...
File src/com/google/caja/plugin/html-schema.js (right):

https://codereview.appspot.com/6741065/diff/14001/src/com/google/caja...
src/com/google/caja/plugin/html-schema.js:176:
table[ELEMENT_DOM_INTERFACES[el]] = true;
Note - it's safe to use object as a dictionary here since
ELEMENT_DOM_INTERFACES is known not to contain elements like toString
and valueOf.

https://codereview.appspot.com/6741065/diff/14001/src/com/google/caja...
src/com/google/caja/plugin/html-schema.js:179: scriptInterfacesCache =
cajaVM.def(Object.getOwnPropertyNames(table));
Double check - this file gets run cajoled (in which case
Object.getOwnPropertyNames is shimmed in) or in SES in which case gOPN
is browser provided).

https://codereview.appspot.com/6741065/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kpreid.switchb....@gmail.com  
View profile  
 More options Nov 13 2012, 1:14 pm
From: kpreid.switchb....@gmail.com
Date: Tue, 13 Nov 2012 18:14:09 +0000
Local: Tues, Nov 13 2012 1:14 pm
Subject: Re: Derive DOM element tamings from specification data. (issue 6741065)

https://codereview.appspot.com/6741065/diff/14001/src/com/google/caja...
File src/com/google/caja/plugin/html-schema.js (right):

https://codereview.appspot.com/6741065/diff/14001/src/com/google/caja...
src/com/google/caja/plugin/html-schema.js:176:
table[ELEMENT_DOM_INTERFACES[el]] = true;
On 2012/11/13 17:58:08, Jasvir wrote:

> Note - it's safe to use object as a dictionary here since
> ELEMENT_DOM_INTERFACES is known not to contain elements
> like toString and valueOf.

I'm not sure which object (ELEMENT_DOM_INTERFACES or table) you're
referring to here. Either way, this is safe even if that is not the
case: we iterate over own properties of ELEMENT_DOM_INTERFACES, and the
only thing we ever do with 'table' is get its own properties. This is
just a deduplicator.

https://codereview.appspot.com/6741065/diff/14001/src/com/google/caja...
src/com/google/caja/plugin/html-schema.js:179: scriptInterfacesCache =
cajaVM.def(Object.getOwnPropertyNames(table));
On 2012/11/13 17:58:08, Jasvir wrote:

> Double check - this file gets run cajoled (in which case
> Object.getOwnPropertyNames is shimmed in) or in SES
> in which case gOPN is browser provided).

Yes. This is part of the bundle which includes Domado. Note that it uses
cajaVM.def which only exists in Caja environments, regardless of browser
ES5 support.

https://codereview.appspot.com/6741065/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »