1 /*
2 * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.gwtwidgets.client.ext.impl;
18
19 import org.gwtwidgets.client.ext.Namespace;
20 import com.google.gwt.user.client.Element;
21
22 public class ExtDOMImplIE6 extends ExtDOMImpl
23 {
24
25 public Element createElementNS (Namespace ns, String tag)
26 {
27 return createElementNS(ns.getPrefix(), tag);
28 }
29
30 private native Element createElementNS (String prefix, String tag) /*-{
31 return $doc.createElement(prefix + ":" + tag);
32 }-*/;
33
34 /***
35 * Set a namespace attr, using the namespace of the element.
36 */
37 public native void setAttributeNS (Element elem, String attr, String value) /*-{
38 elem.setAttribute(attr, value);
39 }-*/;
40
41
42 public void setAttributeNS (Namespace ns, Element elem, String attr, String value)
43 {
44 setAttributeNS(ns.getPrefix(), elem, attr, value);
45 }
46
47 private native void setAttributeNS (String prefix, Element elem, String attr, String value) /*-{
48 elem.setAttribute(prefix + ":" + attr, value);
49 }-*/;
50
51 }