Skip to content

Problem validating a WebIDL that uses 'object' as an attribute name. #2

philipfennell opened this Issue Mar 24, 2012 · 2 comments

2 participants


The following WebIDL fragment, when validated using the W3C's WebIDL checker generates an error:

interface Triple {
    readonly attribute RDFNode subject;
    readonly attribute RDFNode predicate;
    readonly attribute RDFNode object;

    stringifier DOMString toString ();
    boolean               equals (Triple otherTriple);

Results of checking .

The following errors were found in the extracted WebIDLs:

at 'object': expected identifier

If I change the 'object' attribute's name to something other than 'object', e.g. 'smobject' the problem goes away.

I have only recently started looking at WebIDL so I don't know if this is a problem with the definition or the validator. Is 'object' a reserved keyword?


Hi Philip,

Yes, object is a reserved keyword (see

You need to "escape" it with _ if you want to use that name.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.