Giter VIP home page Giter VIP logo

cubism's Issues

Scope leads to element not found errors

Bug Report

Since introducing scopes I've seen a couple of element not found errors

Describe the bug

CableReady innerHtml failed due to missing DOM element for selector: 'cubicle-element#cubicle-36bcb9ab85af3f0e0601d3ed2b7afa24[identifier='ImdpZDovL3N0ZXJvaWRkL1BoYXNlVG9waWMvMjAxNSI=--23bd8fe4b5447dda42c4737dfac98a4ccbd91261f56ba857f7c4f83f614f9525'][scope='InNob3ci--4a60a79bb92a091d1ce865583ba7b37e06e36842b3b778e545e70282836cc28e']'

where the scope cannot be found. Probably this is due to the use of signed stream verifiers (maybe expiration)?

Expected behavior

Should find appropriate elements. Maybe we should fall back to either plain strings or digests.

Add IntersectionObserver as appear trigger

Feature Request

Elements scrolling into the viewport should trigger appear (and vice versa, disappear).

Describe the solution you'd like

As a new key, let's add :intersect, which will instantiate an IntersectionObserver in cubicle-element, which in turn will trigger this.appear and this.disappear.

Async DOM mutations

Feature Request

Sometimes triggerRoot refers to an element that has not been attached to the DOM yet. It would be great to await those (but querySelector doesn't have that ability

Describe the solution you'd like

Use a MutationObserver to add event listeners to nodes that haven't appeared the moment cubicle is installed: https://stackoverflow.com/a/69071754

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.