Compatibility
moz-behaviors.xml extends the interfaces of certain objects
to facilitate cross-browser compatibility.
The properties and methods below should all work according to the Microsoft specification.
These are the currently supported extensions:
| Interface | Property | Comments |
|---|---|---|
| component | element | |
| event | Mozilla’s event object is promoted to global within the scope of a behavior | |
| CSSStyleDeclaration | pixelLeft | |
| pixelHeight | ||
| pixelTop | ||
| pixelWidth | ||
| Event | button | over-ridden to comply with Explorer |
| cancelBubble | made writeable | |
| fromElement | ||
| offsetX | ||
| offsetY | ||
| returnValue | may be used to cancel the event (cannot be undone) | |
| srcElement | ||
| toElement | ||
| HTMLDocument | all | |
| behaviorUrns | for internal use | |
| createEventObject | ||
| HTMLElement | addBehavior | |
| all | ||
| attachEvent | ||
| contains | ||
| createEventObject | ||
| currentStyle | ||
| fireEvent | ||
| innerText | ||
| removeBehavior | not implemented | |
| removeEvent | ||
| runtimeStyle | this doesn’t work | |
| uniqueID |
(For your interest) Mozilla already supports these:
| Interface | Property | Comments |
|---|---|---|
| HTMLElement | clientHeight | |
| clientWidth | ||
| innerHTML | ||
| offsetHeight | ||
| offsetLeft | ||
| offsetParent | ||
| offsetTop | ||
| offsetWidth |
I might support these in the future:
| Interface | Property | Comments |
|---|---|---|
| HTMLElement | behaviorUrns | |
| children | ||
| hideFocus | ||
| now supported | ||
| outerHTML | ||
| now supported | ||
| now supported |
These are all but totally ruled out:
| Interface | Property | Comments |
|---|---|---|
| document | now supported (it was easy) | |
| HTMLElement | now supported | |
| applyElement |