[Bug] show does not seem to work

This issue has been tracked since 2022-07-27.

The following code

    li > span { display:none }

  <script type="text/hyperscript">
    def showElement (Element)
      set *display of Element to 'inline-block'
      show #span_with_id
      show .css-class
      show <span[name="element-name"]/>
      log 'completed'

If everything works as intended, the following list elements should not be empty:


  <li><span id="span_with_id">this line was found by its HTML id</span></li>
  <li><span class="css-class">this line was found by its CSS class</span></li>
  <li><span name="element-name">this line was found by a CSS query</span></li>

does not show the referenced list elements - however, if you use showElement instead of show, everything works fine (i.e., the references themselves are working)

A live example can be found here

dz4k wrote this answer on 2022-08-18

Oh... the bug is that show assumes elements start as visible and are hidden by hide. As a workaround, you should be able to specify show #span_with_id with display:inline-block

rozek wrote this answer on 2022-08-18

Thanks for marking it as a bug

More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86


Issue Title Created Date Updated Date