Пропустить навигацию
got html-in-canvas working with polyfill in all browsers including safari.
0:00 / 0:23

got html-in-canvas working with polyfill in all browsers including safari.

Palash Bansal

@repalash3,3 тыс. подписчиков

Открыть в X
146 отметок «Нравится»СкачатьОригинальный пост

16 106 просмотров

got html-in-canvas working with polyfill in all browsers including safari. and it works better than in canary(for now) send me your examples to try out

18 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Wes Bos

    @wesbos

    Is this using foreign object?

    5 отметок «Нравится»

  • Фото профиля Palash Bansal

    @repalash

    Yes, with embedding of urls, and syncing of form and scroll states.

    2 отметки «Нравится»

  • Фото профиля Wes Bos

    @wesbos

    Awesome! I’ve done some weird things with foreign object

    5 отметок «Нравится»

  • Фото профиля Nick Daniel

    @the_duke_nd

    that's really cool. polyfills, amazing! there are several demos up at for exploration

    4 отметки «Нравится»

  • Фото профиля mrdoob

    @mrdoob

    Do hovers work? And css animations?

    3 отметки «Нравится»

  • Фото профиля Palash Bansal

    @repalash

    Hover partly works by showing a semi transparent overlay but it's not very good. css animations work perfectly.

    1 отметка «Нравится»

  • Фото профиля mrdoob

    @mrdoob

    I meant :hover 👀

  • Фото профиля Palash Bansal

    @repalash

    ok, :hover also done, bit hacky but works.

    2 отметки «Нравится»

  • Фото профиля robby - rbby.dev

    @rbbydotdev

    "we've got render html inside svg at home"

    2 отметки «Нравится»

  • Фото профиля arthur.js

    @ArthurCloche

    I want to see the fps and the %CPU usage. I think we all tried this at some point and the amount of gymnastics needed to do it at scale just not worth it. Msdf font is still way faster and slug gives you the bounding rect for free so super cheap to raycast.

    1 отметка «Нравится»

  • Фото профиля Palash Bansal

    @repalash

    This scene is 40-60fps on m4 mac at 2x resolution. So not that bad. Ofcourse I can't argue about sdf, there isn't a better thing in CS, but this is for html, not text, in the video you can see very complex css animations and html inputs rendered in the canvas.

  • Фото профиля Antonio Bonet

    @tonyblu331

    How are you making it backwards compatible?

    1 отметка «Нравится»

  • Фото профиля Palash Bansal

    @repalash

    we can render html inside svg already.

    3 отметки «Нравится»

  • Фото профиля mongrlz

    @mongrlz

    How did you get it to work in Safari in other well, all browsers? So this is like working in normal Chrome? How did you do that?

    1 отметка «Нравится»

  • Фото профиля Palash Bansal

    @repalash

    It uses foreign object in svgs, you can checkout the code here -

    1 отметка «Нравится»

  • Фото профиля mongrlz

    @mongrlz

    thx you for this just made a game changer for me

    1 отметка «Нравится»

  • Фото профиля Lukas 'David'

    @MoonWalkerLD

    Love tinkering with this kind of tech at home! Safari compatibility is usually the killer. Would love to test it with some three.js space visualizations.

    1 отметка «Нравится»

  • Фото профиля Palash Bansal

    @repalash

    There is one with wormhole at the end of the video