Content deleted Content added
Mike Dillon (talk | contribs) update to code from dev; adds attribute handler functions, options to change namespace and tag names, special handling for "style" in IE |
Mike Dillon (talk | contribs) fix broken browsers without createElementNS |
||
(7 intermediate revisions by the same user not shown) | |||
Line 17:
// Default tag names to be installed into the namespace as functions
var defaultTagNames = [
"
"bdo",▼
"pre", "a", "div", "span", "ul", "ol", "li", "img", "hr", "br", "em", "strong",
"
"code", "table", "tbody", "tfoot", "tr", "th", "td", "col", "colgroup", "caption",
▲ "em", "strong", "sup", "sub", "tt", "abbr", "acronym",
▲ "table", "tbody", "tfoot", "tr", "th", "td", "col", "colgroup", "caption",
"form", "input", "select", "option", "optgroup", "button", "textarea",
"h1", "h2", "h3", "h4", "h5", "h6", "label", "canvas", "fieldset", "legend"
];
Line 53 ⟶ 40:
var settings = {
"namespaceUri": "http://www.w3.org/1999/xhtml",
"invokeFunctions": true,
"tagNames": defaultTagNames,
"eventTypes": defaultEventTypes
};
Line 66 ⟶ 50:
settings[p] = options[p];
}
}
// If the browser doesn't understand createElementNS, fake it (God help them...)
if (isUndefined(document.createElementNS)) {
document.createElementNS = function (ns, name) {
return document.createElement(name);
}
// Creates the DOM element
var createDomElement = function(name) {
};
|