Code Monkey home page Code Monkey logo

tink_domspec's People

Contributors

back2dos avatar cedx avatar clarkjones avatar feeddageek avatar gene-pavlovsky avatar grepsuzette avatar grosmar avatar j-jzk avatar kevinresol avatar markknol avatar ousado avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tink_domspec's Issues

Problem with attributes having a type Int?

Although things normally seem to work well for me, from a hxx string as soon as I use some Int attribute for a tag accepting them (e.g. <input> accepts maxLength:Int) I get an error.

For example
function render() '<div class="alert" tabIndex="-1">'
Gives String should be Null<Int>.

Another example
<input maxLength="34" type="text" name="nickname" value="" />
Gives String should be Null<Int>.

I cannot remove the double quotes, or then I have this error: expected ".

I tried with curly brackets like maxLength="{34}" but no luck either.

Allow custom Element type name

Now it parses from the Attr name (e.g. InputAttr -> InputElement) which is not very flexible.

For example I just added ins/del element, they have their own attributes in additional to the global ones. But they don't have a separate type InsElement/DelElement. So we should type them as plain Element

Add some way to fetch js.html.*Element based on tag name

I'm looking for a way to go from 'div' to js.html.DivElement etc. It should be useful to type EventFrom properly. The letter casing is not consistent so I think mapping it like tink.domspec.Tags is probably the best way. I can contribute if it's something that fits here?

[FR] Add basic svg tags

For possibility to inline svg like this

<div class="icon-for-button">
    <svg>
        <rect ... />
        <path .... />
   </svg>
</div>

Attributes name containing dash, e.g. `aria-hidden`

aria-hidden="true" is an attribute which has the effect of having the marked node and its children ignored by the accessibilty APIs (so <span aria-hidden="true">Not everything should be said</span> would not be read aloud by text-to-speech systems).

I would like to submit a PR having aria-hidden plus a couple of others to address some missing accessibility features, which I think is important both for library support and users.

However I am unsure how, because of the dash (aria-hidden) it contains.

Another related question. This code compiles fine:

function render() '
<div class="modal" style="display: block" tabIndex={-1}>
   <div class="modal-dialog">
     <div class="modal-content">
      <div class="modal-header">
         <h5 class="modal-title">{title}</h5>
         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <!--<span aria-hidden="true">&times;</span>-->
         </button>
           ... etc
';

It is puzzling that the commented out <span aria-hidden..> would refuse to compile (I think it's because it's missing from the specs). While the <button .. aria-label="Close"> right above it sees no problem, yet it is absent from the view markup in the DOM inspector.

Is there an obvious reason why?

Aria attributes error

I want to add this to typedef GlobalAttr<Style>:

  @:html('aria-label') @:optional var ariaLabel(default, never):String;
  @:html('aria-labeledby') @:optional var ariaLabelledby(default, never):String;
  @:html('aria-describedby') @:optional var ariaDescribedby(default, never):String;
  @:html('aria-autocomplete') @:optional var ariaAutocomplete(default, never):String;
  @:html('aria-dropeffect') @:optional var ariaDropEffect(default, never):String;
  @:html('aria-hidden') @:optional var ariaHidden(default, never):Bool;
  @:html('aria-disabled') @:optional var ariaDisabled(default, never):Bool;
  @:html('aria-checked') @:optional var ariaChecked(default, never):Bool;
  @:html('aria-haspopup') @:optional var ariaHasPopup(default, never):Bool;
  @:html('aria-grabbed') @:optional var ariaGrabbed(default, never):Bool;

But I get this error:

type TType(tink.domspec.Tags,[]) has no fields

It specifically throws that error on the Bools, with just the Strings it compiles nicely.

Using Haxe 4.0.5 / latest git tink_domspec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.