diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLAnchorElement.java b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLAnchorElement.java new file mode 100644 index 000000000..cd7452888 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLAnchorElement.java @@ -0,0 +1,66 @@ +/* + * Copyright 2018 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.dom.html; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.types.DOMTokenList; + +public interface HTMLAnchorElement extends HTMLElement { + @JSProperty + String getHref(); + + @JSProperty + void setHref(String value); + + @JSProperty + String getTarget(); + + @JSProperty + void setTarget(String value); + + @JSProperty + String getRel(); + + @JSProperty + void setRel(String value); + + @JSProperty + DOMTokenList getTokenList(); + + @JSProperty + String getMedia(); + + @JSProperty + void setMedia(String value); + + @JSProperty + String getHreflang(); + + @JSProperty + void setHreflang(String value); + + @JSProperty + String getType(); + + @JSProperty + void setType(String value); + + @JSProperty + String getText(); + + @JSProperty + void setText(String value); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLScriptElement.java b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLScriptElement.java new file mode 100644 index 000000000..c2c5f2aff --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLScriptElement.java @@ -0,0 +1,56 @@ +/* + * Copyright 2018 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.dom.html; + +import org.teavm.jso.JSProperty; + +public interface HTMLScriptElement extends HTMLElement { + @JSProperty + String getSrc(); + + @JSProperty + void setSrc(String value); + + @JSProperty + boolean isAsync(); + + @JSProperty + void setAsync(boolean value); + + @JSProperty + boolean isDefer(); + + @JSProperty + void setDefer(boolean value); + + @JSProperty + String getType(); + + @JSProperty + void setType(String value); + + @JSProperty + String getCharset(); + + @JSProperty + void setCharset(String value); + + @JSProperty + String getText(); + + @JSProperty + void setText(String value); +} diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java b/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java new file mode 100644 index 000000000..6f69e6d83 --- /dev/null +++ b/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java @@ -0,0 +1,36 @@ +/* + * Copyright 2018 Alexey Andreev. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.teavm.jso.dom.types; + +import org.teavm.jso.JSIndexer; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; + +public interface DOMTokenList extends JSObject { + @JSProperty + int getLength(); + + @JSIndexer + String item(int index); + + boolean contains(String token); + + void add(String token); + + void remove(String token); + + boolean toggle(String token); +}