Repository: flex-asjs Updated Branches: refs/heads/feature/flexjs_wrapper 02655c9aa -> 4897085b8
And HTML (with a couple of extra elements â still needs work)⦠Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4897085b Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4897085b Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4897085b Branch: refs/heads/feature/flexjs_wrapper Commit: 4897085b82a9a60fbaefa765971bd2bb1f8bcf4e Parents: 02655c9 Author: Harbs <ha...@in-tools.com> Authored: Tue Sep 26 21:48:50 2017 +0300 Committer: Harbs <ha...@in-tools.com> Committed: Tue Sep 26 21:48:50 2017 +0300 ---------------------------------------------------------------------- .../src/main/flex/org/apache/flex/html/A.as | 9 +- .../src/main/flex/org/apache/flex/html/H1.as | 10 +- .../src/main/flex/org/apache/flex/html/H2.as | 10 +- .../src/main/flex/org/apache/flex/html/H3.as | 10 +- .../src/main/flex/org/apache/flex/html/H4.as | 10 +- .../src/main/flex/org/apache/flex/html/H5.as | 10 +- .../src/main/flex/org/apache/flex/html/H6.as | 10 +- .../main/flex/org/apache/flex/html/HTMLText.as | 5 +- .../src/main/flex/org/apache/flex/html/I.as | 8 +- .../src/main/flex/org/apache/flex/html/Input.as | 123 +++++++++++++++++++ .../src/main/flex/org/apache/flex/html/Li.as | 9 +- .../src/main/flex/org/apache/flex/html/Ol.as | 61 +++++++++ .../main/flex/org/apache/flex/html/Option.as | 12 +- .../src/main/flex/org/apache/flex/html/P.as | 10 +- .../main/flex/org/apache/flex/html/Select.as | 10 +- .../src/main/flex/org/apache/flex/html/Span.as | 10 +- .../src/main/flex/org/apache/flex/html/Td.as | 10 +- .../src/main/flex/org/apache/flex/html/Th.as | 10 +- .../src/main/flex/org/apache/flex/html/Ul.as | 10 +- 19 files changed, 235 insertions(+), 112 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as index 23c0cde..9f55127 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/A.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -111,12 +112,8 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('a') as WrappedHTMLElement; + addElementToWrapper(this,'a'); element.setAttribute('href', href); - - positioner = element; - element.flexjs_wrapper = this; - return element; } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as index 6a7d274..b969adc 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H1.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,15 +95,10 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('h1') as WrappedHTMLElement; + addElementToWrapper(this,'h1'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - - positioner = element; - element.flexjs_wrapper = this; - - //className = typeNames = 'H1'; return element; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as index 7594984..3db9b0b 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H2.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,15 +95,10 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('h2') as WrappedHTMLElement; + addElementToWrapper(this,'h2'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - - positioner = element; - element.flexjs_wrapper = this; - - //className = typeNames = 'H2'; return element; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as index 03badb0..20cefe0 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H3.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,15 +95,10 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('h3') as WrappedHTMLElement; + addElementToWrapper(this,'h3'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - - positioner = element; - element.flexjs_wrapper = this; - - //className = typeNames = 'H3'; return element; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as index 305d5ff..6a95c74 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H4.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,15 +95,10 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('h4') as WrappedHTMLElement; + addElementToWrapper(this,'h4'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - - positioner = element; - element.flexjs_wrapper = this; - - //className = typeNames = 'H4'; return element; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as index 6f587f7..2b64328 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H5.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,15 +95,10 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('h5') as WrappedHTMLElement; + addElementToWrapper(this,'h5'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - - positioner = element; - element.flexjs_wrapper = this; - - //className = typeNames = 'H5'; return element; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as index a68ecd1..79b1eeb 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/H6.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,16 +95,11 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('h6') as WrappedHTMLElement; + addElementToWrapper(this,'h6'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - positioner = element; - element.flexjs_wrapper = this; - - //className = typeNames = 'H6'; - return element; } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/HTMLText.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/HTMLText.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/HTMLText.as index ea60de8..83d321f 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/HTMLText.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/HTMLText.as @@ -26,6 +26,7 @@ package org.apache.flex.html COMPILE::JS { import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -106,9 +107,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('span') as WrappedHTMLElement; - positioner = element; - element.flexjs_wrapper = this; + addElementToWrapper(this,'span'); className = "HTMLText"; typeNames = "HTMLText"; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as index a0b3fdc..c859bee 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/I.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,14 +95,11 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('i') as WrappedHTMLElement; + addElementToWrapper(this,'i'); textNode = document.createTextNode('') as Text; element.appendChild(textNode); - positioner = element; - element.flexjs_wrapper = this; - return element; } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Input.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Input.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Input.as new file mode 100644 index 0000000..02e2814 --- /dev/null +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Input.as @@ -0,0 +1,123 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You 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.apache.flex.html +{ + import org.apache.flex.core.UIBase; + + COMPILE::JS + { + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; + } + + /** + * The Input class represents an HTML <input> element + * + * + * @toplevel + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class Input extends UIBase + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function Input() + { + super(); + } + + private var _text:String = ""; + + /** + * The text of the element + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get text():String + { + COMPILE::SWF + { + return _text; + } + COMPILE::JS + { + return textNode.nodeValue; + } + } + + public function set text(value:String):void + { + COMPILE::SWF + { + _text = value; + } + COMPILE::JS + { + textNode.nodeValue = value; + } + } + + private var _type:String; + public function get type():String + { + return _type; + } + public function set type(value:String):void + { + _type = value; + COMPILE::JS + { + if(element) + element.setAttribute('type', value); + } + } + + COMPILE::JS + private var textNode:Text; + + /** + * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement + * @flexjsignorecoercion HTMLElement + */ + COMPILE::JS + override protected function createElement():WrappedHTMLElement + { + addElementToWrapper(this,'input'); + if(_type) + element.setAttribute('type', _type); + + textNode = document.createTextNode('') as Text; + element.appendChild(textNode); + + return element; + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as index 8a2a60f..d9bd6a1 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Li.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -55,11 +56,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('li') as WrappedHTMLElement; - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'li'); } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ol.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ol.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ol.as new file mode 100644 index 0000000..3d76b5b --- /dev/null +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ol.as @@ -0,0 +1,61 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You 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.apache.flex.html +{ + COMPILE::JS + { + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; + } + + /** + * The Ul class represents an HTML <ul> element + * + * + * @toplevel + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class Ol extends Group + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function Ol() + { + super(); + } + + /** + * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement + */ + COMPILE::JS + override protected function createElement():WrappedHTMLElement + { + return addElementToWrapper(this,'ul'); + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Option.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Option.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Option.as index a360f1b..ec50cca 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Option.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Option.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -94,15 +95,10 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - var option:HTMLOptionElement = document.createElement('option') as HTMLOptionElement; + addElementToWrapper(this,'option'); textNode = document.createTextNode('') as Text; - option.appendChild(textNode); - - element = option as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; + element.appendChild(textNode); return element; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as index b7530aa..46561e6 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/P.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -87,12 +88,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('p') as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'p'); } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as index e7cb862..55d5961 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Select.as @@ -22,7 +22,8 @@ package org.apache.flex.html COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -57,12 +58,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('select') as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'select'); } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as index d3f025b..69b5ebb 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -87,12 +88,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('span') as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'span'); } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Td.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Td.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Td.as index 3052a13..9d36b58 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Td.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Td.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -87,12 +88,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('td') as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'td'); } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as index cc7aedf..233ec49 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Th.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -87,12 +88,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('th') as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'th'); } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4897085b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as index 770d37f..5af20a7 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Ul.as @@ -20,7 +20,8 @@ package org.apache.flex.html { COMPILE::JS { - import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.html.addElementToWrapper; } /** @@ -54,12 +55,7 @@ package org.apache.flex.html COMPILE::JS override protected function createElement():WrappedHTMLElement { - element = document.createElement('ul') as WrappedHTMLElement; - - positioner = element; - element.flexjs_wrapper = this; - - return element; + return addElementToWrapper(this,'ul'); } } }