JSFiddle

  • MS Edge label > input[type=file] bug: workaround

    No-Library (pure JS), HTML, CSS, JavaScript

    var MainThing = {
      controller: function(opts){
      
      },
      view: function(ctrl, opts){
        return m("form",
          m("label.file[for=inputID]",
          	m("span.file-custom ...
  • MS Edge label > input[type=file] bug: workaround

    No-Library (pure JS), HTML, CSS, JavaScript

    var MainThing = {
      controller: function(opts){
      
      },
      view: function(ctrl, opts){
        return m("form",
          m("input#inputID[type=file]"),
          m("label.file ...
  • MS Edge file input bug

    No-Library (pure JS), HTML, CSS, JavaScript

    function m( tag, attributes, children = [] ){
    	const element = typeof tag == 'string' ? document.createElement( tag ) : tag
      
      if( typeof attributes == 'object' && !Array.isArray ...
  • MS Edge file input bug

    No-Library (pure JS), HTML, CSS, JavaScript

    var MainThing = {
      controller: function(opts){
      
      },
      view: function(ctrl, opts){
        return m("form",
          m("label.file",
            m("input.file"),
            m("span ...
  • MS Edge file input bug

    No-Library (pure JS), HTML, CSS, JavaScript

    <h1>Hello, world!</h1>
    <div id="main"><form><label class="file"><input type="file"><span class="file-custom"></span></label></form></div>
    
  • Another attempt at granular redraw in Mithril 0.2

    No-Library (pure JS), HTML, CSS, JavaScript

    const re = ( ( map = new Map() ) => {
    	return {
      	gister : ( ctrl, view, input ) =>
        	el =>
          	map.set( ctrl, { el, input, view, context : [].map.call ...
  • Another attempt at granular redraw in Mithril 0.2

    No-Library (pure JS), HTML, CSS, JavaScript

    const re = ( ( map = new Map() ) => {
    	return {
      	gister : ( ctrl, view, input ) =>
        	el =>
          	map.set( ctrl, { el, input, view, context : [].map.call ...
  • Another attempt at granular redraw in Mithril 0.2

    No-Library (pure JS), HTML, CSS, JavaScript

    const re = ( ( map = new Map() ) => {
    	return {
      	gister : ( view, [ ctrl, ...input ] ) => el =>
          map.set( ctrl, { el, input, view : this.view, context ...
  • Another attempt at granular redraw in Mithril 0.2

    No-Library (pure JS), HTML, CSS, JavaScript

    const re = ( ( map = new Map() ) => {
    	return {
      	gister : ( ctrl, view, input ) =>
        	el =>
          	map.set( ctrl, { el, input, view, context : [].map.call ...
  • Streams are coerced in situations where strings are expected #8 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    const value = m.prop( 'Hello' )
    
    m.render(
    	document.body,
    	m( 'input', { value } )
    )