Git Product home page Git Product logo

Comments (14)

mitar avatar mitar commented on September 24, 2024

Hm, are there any event bindings which are outside the DOM element Scribe is operating on? Like document level event bindings?

from scribe.

theefer avatar theefer commented on September 24, 2024

There may be, eg toolbar buttons or document-level for keyboard shortcuts.
All parts of plugin though.


Visit theguardian.com. On your mobile, download the Guardian iPhone app
theguardian.com/iphone and our iPad edition theguardian.com/ipadhttp://theguardian.com/iPad.
Save up to 57% by subscribing to the Guardian and Observer - choose the
papers you want and get full digital access. Visit
subscribe.theguardian.com

This e-mail and all attachments are confidential and may also be
privileged. If you are not the named recipient, please notify the sender
and delete the e-mail and all attachments immediately. Do not disclose the
contents to another person. You may not use the information for any
purpose, or store, or copy, it in any way. Guardian News & Media Limited
is not liable for any computer viruses or other material transmitted with
or as part of this e-mail. You should employ virus checking software.

Guardian News & Media Limited is a member of Guardian Media Group plc. Registered
Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP. Registered
in England Number 908396

from scribe.

philfreo avatar philfreo commented on September 24, 2024

👍 - this is really important when there are multiple instances / usage in single-page js apps

Also it should give plugins a way to clean themselves up when the scribe instance is being removed.

from scribe.

TooTallNate avatar TooTallNate commented on September 24, 2024

+1

from scribe.

OliverJAsh avatar OliverJAsh commented on September 24, 2024

It’s lazy of us not to have done this from the onset, and for that I apologise – however we are using Scribe in a large application with many instances and these memory leaks have had no wide reaching implications to date, as far as we can tell. Thus, we probably won't get around to implementing this unless it becomes a problem for us (bigger fish to fry).

Having said all of that, this could definitely become an issue for consumers other than ourselves, so I hand this one off to the community.

from scribe.

craigspaeth avatar craigspaeth commented on September 24, 2024

👍 I'm using Scribe in conjunction with React and this is needed to keep state clean. Totally understand the bigger fish thing though, so maybe you'll be seeing a pull request from me in the near future.

from scribe.

saranrapjs avatar saranrapjs commented on September 24, 2024

+1 — currently working around this by cloning elements with DOM listeners (like the toolbar) but would be great if "destroy" was baked into the plugin architecture somehow

from scribe.

anatoliyarkhipov avatar anatoliyarkhipov commented on September 24, 2024

+1

from scribe.

triptec avatar triptec commented on September 24, 2024

Any news about this? I'm also putting this in a react app and would like to clean up.

from scribe.

rrees avatar rrees commented on September 24, 2024

I think we're looking for a suitable community contribution.

from scribe.

triptec avatar triptec commented on September 24, 2024

@rrees is there something simple to start with, like adding it to the api and set this = null and then step by step clean up plugins, event listeners et al?

from scribe.

rrees avatar rrees commented on September 24, 2024

@triptec I love changes that are simple so this sounds like a good place to start.

from scribe.

triptec avatar triptec commented on September 24, 2024

I'll look into it this weekend.

from scribe.

rrees avatar rrees commented on September 24, 2024

Thanks feel free to just implement the basic stub and then add the event listeners and plugins in a follow up.

from scribe.

Related Issues (20)

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.