Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Correct string to Stringish
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Mar 19, 2015
1 parent ddbb642 commit 5f4e194
Show file tree
Hide file tree
Showing 44 changed files with 155 additions and 155 deletions.
152 changes: 76 additions & 76 deletions src/html/Element.php
Expand Up @@ -19,90 +19,90 @@ abstract class :xhp:html-element extends :x:primitive {

attribute
// Global HTML attributes
string accesskey,
string class,
Stringish accesskey,
Stringish class,
bool contenteditable,
string contextmenu,
string dir,
Stringish contextmenu,
Stringish dir,
bool draggable,
string dropzone,
Stringish dropzone,
bool hidden,
string id,
Stringish id,
bool inert,
string itemid,
string itemprop,
string itemref,
string itemscope,
string itemtype,
string lang,
string role,
Stringish itemid,
Stringish itemprop,
Stringish itemref,
Stringish itemscope,
Stringish itemtype,
Stringish lang,
Stringish role,
enum {'true', 'false'} spellcheck,
string style,
string tabindex,
string title,
Stringish style,
Stringish tabindex,
Stringish title,
enum {'yes', 'no'} translate,

// Javascript events
string onabort,
string onblur,
string oncancel,
string oncanplay,
string oncanplaythrough,
string onchange,
string onclick,
string onclose,
string oncontextmenu,
string oncuechange,
string ondblclick,
string ondrag,
string ondragend,
string ondragenter,
string ondragexit,
string ondragleave,
string ondragover,
string ondragstart,
string ondrop,
string ondurationchange,
string onemptied,
string onended,
string onerror,
string onfocus,
string oninput,
string oninvalid,
string onkeydown,
string onkeypress,
string onkeyup,
string onload,
string onloadeddata,
string onloadedmetadata,
string onloadstart,
string onmousedown,
string onmouseenter,
string onmouseleave,
string onmousemove,
string onmouseout,
string onmouseover,
string onmouseup,
string onmousewheel,
string onpause,
string onplay,
string onplaying,
string onprogress,
string onratechange,
string onreset,
string onresize,
string onscroll,
string onseeked,
string onseeking,
string onselect,
string onshow,
string onstalled,
string onsubmit,
string onsuspend,
string ontimeupdate,
string ontoggle,
string onvolumechange,
string onwaiting;
Stringish onabort,
Stringish onblur,
Stringish oncancel,
Stringish oncanplay,
Stringish oncanplaythrough,
Stringish onchange,
Stringish onclick,
Stringish onclose,
Stringish oncontextmenu,
Stringish oncuechange,
Stringish ondblclick,
Stringish ondrag,
Stringish ondragend,
Stringish ondragenter,
Stringish ondragexit,
Stringish ondragleave,
Stringish ondragover,
Stringish ondragstart,
Stringish ondrop,
Stringish ondurationchange,
Stringish onemptied,
Stringish onended,
Stringish onerror,
Stringish onfocus,
Stringish oninput,
Stringish oninvalid,
Stringish onkeydown,
Stringish onkeypress,
Stringish onkeyup,
Stringish onload,
Stringish onloadeddata,
Stringish onloadedmetadata,
Stringish onloadstart,
Stringish onmousedown,
Stringish onmouseenter,
Stringish onmouseleave,
Stringish onmousemove,
Stringish onmouseout,
Stringish onmouseover,
Stringish onmouseup,
Stringish onmousewheel,
Stringish onpause,
Stringish onplay,
Stringish onplaying,
Stringish onprogress,
Stringish onratechange,
Stringish onreset,
Stringish onresize,
Stringish onscroll,
Stringish onseeked,
Stringish onseeking,
Stringish onselect,
Stringish onshow,
Stringish onstalled,
Stringish onsubmit,
Stringish onsuspend,
Stringish ontimeupdate,
Stringish ontoggle,
Stringish onvolumechange,
Stringish onwaiting;

protected string $tagName = '';

Expand Down
2 changes: 1 addition & 1 deletion src/html/PcdataElement.php
Expand Up @@ -10,7 +10,7 @@
*/

/**
* Subclasses of :xhp:pcdata-elements may contain only string children.
* Subclasses of :xhp:pcdata-elements may contain only Stringish children.
*/
abstract class :xhp:pcdata-element extends :xhp:html-element {
children (pcdata)*;
Expand Down
2 changes: 1 addition & 1 deletion src/html/RawPcdataElement.php
Expand Up @@ -10,7 +10,7 @@
*/

/**
* Subclasses of :xhp:raw-pcdata-element must contain only string children.
* Subclasses of :xhp:raw-pcdata-element must contain only Stringish children.
* However, the strings will not be escaped. This is intended for tags like
* <script> or <style> whose content is interpreted literally by the browser.
*
Expand Down
6 changes: 3 additions & 3 deletions src/html/tags/a/A.php
Expand Up @@ -11,10 +11,10 @@

class :a extends :xhp:html-element {
attribute
string download, string href, string hreflang, string media, string rel,
string target, string type,
Stringish download, Stringish href, Stringish hreflang, Stringish media, Stringish rel,
Stringish target, Stringish type,
// Legacy
string name;
Stringish name;
category %flow, %phrase, %interactive;
// Should not contain %interactive
children (pcdata | %flow)*;
Expand Down
6 changes: 3 additions & 3 deletions src/html/tags/a/Area.php
Expand Up @@ -11,11 +11,11 @@

class :area extends :xhp:html-singleton {
attribute
string alt, string coords, string download, string href, bool hreflang,
string media, string rel,
Stringish alt, Stringish coords, Stringish download, Stringish href, bool hreflang,
Stringish media, Stringish rel,
enum {
'circ', 'circle', 'default', 'poly', 'polygon', 'rect', 'rectangle'
} shape, string target, string type;
} shape, Stringish target, Stringish type;
category %flow, %phrase;
protected string $tagName = 'area';
}
4 changes: 2 additions & 2 deletions src/html/tags/a/Audio.php
Expand Up @@ -13,8 +13,8 @@ class :audio extends :xhp:html-element {
attribute
bool autoplay, bool controls,
enum {'anonymous', 'use-credentials'} crossorigin, bool loop,
string mediagroup, bool muted, enum {'none', 'metadata', 'auto'} preload,
string src;
Stringish mediagroup, bool muted, enum {'none', 'metadata', 'auto'} preload,
Stringish src;
category %flow, %phrase, %embedded, %interactive;
children (:source*, :track*, (pcdata | %flow)*);
protected string $tagName = 'audio';
Expand Down
2 changes: 1 addition & 1 deletion src/html/tags/b/Base.php
Expand Up @@ -10,7 +10,7 @@
*/

class :base extends :xhp:html-singleton {
attribute string href, string target;
attribute Stringish href, Stringish target;
category %metadata;
protected string $tagName = 'base';
}
2 changes: 1 addition & 1 deletion src/html/tags/b/Blockquote.php
Expand Up @@ -10,7 +10,7 @@
*/

class :blockquote extends :xhp:html-element {
attribute string cite;
attribute Stringish cite;
category %flow, %sectioning;
children (pcdata | %flow)*;
protected string $tagName = 'blockquote';
Expand Down
8 changes: 4 additions & 4 deletions src/html/tags/b/Body.php
Expand Up @@ -11,10 +11,10 @@

class :body extends :xhp:html-element {
attribute
string onafterprint, string onbeforeprint, string onbeforeunload,
string onhashchange, string onmessage, string onoffline, string ononline,
string onpagehide, string onpageshow, string onpopstate, string onstorage,
string onunload;
Stringish onafterprint, Stringish onbeforeprint, Stringish onbeforeunload,
Stringish onhashchange, Stringish onmessage, Stringish onoffline, Stringish ononline,
Stringish onpagehide, Stringish onpageshow, Stringish onpopstate, Stringish onstorage,
Stringish onunload;
children (pcdata | %flow)*;
protected string $tagName = 'body';
}
8 changes: 4 additions & 4 deletions src/html/tags/b/Button.php
Expand Up @@ -11,10 +11,10 @@

class :button extends :xhp:html-element {
attribute
bool autofocus, bool disabled, string form, string formaction,
string formenctype, enum {'get', 'post'} formmethod, bool formnovalidate,
string formtarget, string menu, string name,
enum {'submit', 'button', 'reset'} type, string value;
bool autofocus, bool disabled, Stringish form, Stringish formaction,
Stringish formenctype, enum {'get', 'post'} formmethod, bool formnovalidate,
Stringish formtarget, Stringish menu, Stringish name,
enum {'submit', 'button', 'reset'} type, Stringish value;
category %flow, %phrase, %interactive;
// Should not contain interactive
children (pcdata | %phrase)*;
Expand Down
2 changes: 1 addition & 1 deletion src/html/tags/c/ConditionalComment.php
Expand Up @@ -14,7 +14,7 @@
* the conditional statement.
*/
class :x:conditional-comment extends :x:primitive {
attribute string if @required;
attribute Stringish if @required;
children (pcdata | :xhp)*;

protected function stringify(): string {
Expand Down
2 changes: 1 addition & 1 deletion src/html/tags/d/Data.php
Expand Up @@ -10,7 +10,7 @@
*/

class :data extends :xhp:html-element {
attribute string value @required;
attribute Stringish value @required;
category %flow, %phrase;
children (%phrase*);
protected string $tagName = 'data';
Expand Down
2 changes: 1 addition & 1 deletion src/html/tags/d/Del.php
Expand Up @@ -10,7 +10,7 @@
*/

class :del extends :xhp:html-element {
attribute string cite, string datetime;
attribute Stringish cite, Stringish datetime;
category %flow, %phrase;
// transparent
children (pcdata | %flow)*;
Expand Down
4 changes: 2 additions & 2 deletions src/html/tags/e/Embed.php
Expand Up @@ -11,13 +11,13 @@

class :embed extends :xhp:html-element {
attribute
int height, string src, string type, int width,
int height, Stringish src, Stringish type, int width,
/**
* The following attributes are Flash specific.
* Most notable use: youtube video embedding
*/
bool allowfullscreen, enum {'always', 'never'} allowscriptaccess,
string wmode;
Stringish wmode;

category %flow, %phrase, %embedded, %interactive;
children (pcdata | %phrase)*;
Expand Down
2 changes: 1 addition & 1 deletion src/html/tags/f/Fieldset.php
Expand Up @@ -10,7 +10,7 @@
*/

class :fieldset extends :xhp:html-element {
attribute bool disabled, string form, string name;
attribute bool disabled, Stringish form, Stringish name;
category %flow;
children (:legend?, (pcdata | %flow)*);
protected string $tagName = 'fieldset';
Expand Down
6 changes: 3 additions & 3 deletions src/html/tags/f/Form.php
Expand Up @@ -11,9 +11,9 @@

class :form extends :xhp:html-element {
attribute
string action, string accept-charset, enum {'on', 'off'} autocomplete,
string enctype, enum {'get', 'post'} method, string name, bool novalidate,
string target;
Stringish action, Stringish accept-charset, enum {'on', 'off'} autocomplete,
Stringish enctype, enum {'get', 'post'} method, Stringish name, bool novalidate,
Stringish target;
category %flow;
// Should not contain :form
children (pcdata | %flow)*;
Expand Down
2 changes: 1 addition & 1 deletion src/html/tags/h/Html.php
Expand Up @@ -10,7 +10,7 @@
*/

class :html extends :xhp:html-element {
attribute string manifest, string xmlns;
attribute Stringish manifest, Stringish xmlns;
children (:head, :body);
protected string $tagName = 'html';
}
4 changes: 2 additions & 2 deletions src/html/tags/i/Iframe.php
Expand Up @@ -11,8 +11,8 @@

class :iframe extends :xhp:pcdata-element {
attribute
bool allowfullscreen, string name, int height, string sandbox,
bool seamless, string src, string srcdoc, int width;
bool allowfullscreen, Stringish name, int height, Stringish sandbox,
bool seamless, Stringish src, Stringish srcdoc, int width;
category %flow, %phrase, %embedded, %interactive;
protected string $tagName = 'iframe';
}
4 changes: 2 additions & 2 deletions src/html/tags/i/Img.php
Expand Up @@ -11,8 +11,8 @@

class :img extends :xhp:html-singleton {
attribute
string alt, enum {'anonymous', 'use-credentials'} crossorigin, int height,
bool ismap, string src, string usemap, int width;
Stringish alt, enum {'anonymous', 'use-credentials'} crossorigin, int height,
bool ismap, Stringish src, Stringish usemap, int width;
category %flow, %phrase;
protected string $tagName = 'img';
}
16 changes: 8 additions & 8 deletions src/html/tags/i/Input.php
Expand Up @@ -11,21 +11,21 @@

class :input extends :xhp:html-singleton {
attribute
string accept, string alt, enum {'on', 'off'} autocomplete, bool autofocus,
bool checked, string dirname, bool disabled, string form,
string formaction, string formenctype, enum {'get', 'post'} formmethod,
bool formnovalidate, string formtarget, int height, enum {
Stringish accept, Stringish alt, enum {'on', 'off'} autocomplete, bool autofocus,
bool checked, Stringish dirname, bool disabled, Stringish form,
Stringish formaction, Stringish formenctype, enum {'get', 'post'} formmethod,
bool formnovalidate, Stringish formtarget, int height, enum {
'email', 'full-width-latin', 'kana', 'katakana', 'latin', 'latin-name',
'latin-prose', 'numeric', 'tel', 'url', 'verbatim'
} inputmode, string list, float max, int maxlength, float min,
int minlength, bool multiple, string name, string pattern,
string placeholder, bool readonly, bool required, int size, string src,
} inputmode, Stringish list, float max, int maxlength, float min,
int minlength, bool multiple, Stringish name, Stringish pattern,
Stringish placeholder, bool readonly, bool required, int size, Stringish src,
float step, enum {
'hidden', 'text', 'search', 'tel', 'url', 'email', 'password',
'datetime', 'date', 'month', 'week', 'time', 'datetime-local', 'number',
'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image',
'reset', 'button'
} type, string value, int width;
} type, Stringish value, int width;
category %flow, %phrase, %interactive;
protected string $tagName = 'input';
}

0 comments on commit 5f4e194

Please sign in to comment.