DEV Community

21 Mind-Blowing Web Features You Probably Haven't Heard Of

John Rush on June 03, 2023

Hi, I'm John, Multi Startup Builder. I enjoy both coding and marketing. See all my 20 products here → johnrush.me → my BIO → Say Hi to me On Twit...
Collapse
 
johnrushx profile image
John Rush
Collapse
 
jungar1111 profile image
jungar1111

um dialogs don't work by default. In chrome i get an Uncaught TypeErrorL d1.showmodal is not a function at HTMLButtonElement.onclick. Similar error in Firefox...

any ideas? Didn't see it in the experiemental list.

Collapse
 
jcicero518 profile image
Jeff Cicero

This worked for me in Chrome, it's show() and not showDialog()

<dialog id="myDialog">
  <p>Some content</p>
</dialog>
Enter fullscreen mode Exit fullscreen mode

myDialog.show()

Collapse
 
jcicero518 profile image
Jeff Cicero

One more note, apparently the ID appears in global scope as soon as you add it to the document. So be careful about what the ID is - not sure how this jives with anything else in a lexical scope.

The dom ready listener may not be necessary but:

document.addEventListener('DOMContentLoaded', () => {
      myDialog.show();
    });
Enter fullscreen mode Exit fullscreen mode
Collapse
 
jungar1111 profile image
jungar1111

oh… .show works… I was using a .showmodal() for some reason

Thread Thread
 
jungar1111 profile image
jungar1111

thanks

Collapse
 
sloan profile image
Sloan the DEV Moderator

Hi there, we encourage authors to share their entire posts here on DEV, rather than mostly pointing to an external link. Doing so helps ensure that readers don’t have to jump around to too many different pages, and it helps focus the conversation right here in the comments section.

If you choose to do so, you also have the option to add a canonical URL directly to your post.

Collapse
 
johnrushx profile image
John Rush

I dont have other version of this post. This is the only version. I put twitter embeds for the videos , so that viewers could watch videos. And actually they can watch videos right here.

Collapse
 
johnrushx profile image
John Rush

Hi,
I didn't know how to embed the videos other than with twitter posts.
What's the best way to do it so it plays here?

Collapse
 
vaheqelyan profile image
Vahe

You forgot about the upcoming features

Css style queries
Scroll-driven animations
Css anchoring api

Collapse
 
johnrushx profile image
John Rush

working on a new article to include these

Collapse
 
johnrushx profile image
John Rush
Collapse
 
muzkore profile image
Murray Chapman

Image description