Code Monkey home page Code Monkey logo

sugar's Introduction

I love coffee.

sugar's People

Contributors

dependabot[bot] avatar netalkgb avatar

Watchers

 avatar

sugar's Issues

contextIsolationを有効にしてcontextBridgeを使用する

  • Electron 12以降ではcontextIsolationがデフォルトで有効になっている
  • 旧バージョンからの移行であり、contextIsolationが無効であること前提で作られているため、contextIsolationが無効にしている
  • デフォルトで有効になっている上、セキュリティ�向上のためやりたい

removeEventListenerできていない

コンポーネント内で実DOM取得してaddEventListerしたとき、コンポーネントがDestroyされたときに、removeEventListenerしないとイベント発火し続けるのでremoveEventListenerするようにしているが、イベント追加したときのメソッド(参照)を渡していないため意味がない

mounted () {
    this.width = window.innerWidth
    this.height = window.innerHeight
    window.addEventListener('resize', (_event) => {
      this.width = window.innerWidth
      this.height = window.innerHeight
      logger.debug(this.width, this.height)
    })
  },
  beforeDestroy () {
    window.removeEventListener('resize', () => { })
  },

これやっているのが根っこに近いコンポーネントでどのような条件でも必ず表示されるコンポーネントのため、Destroyされることはなく、removeEventListenerが動くことはないため動作上問題はない

設定全消去

そもそも設定画面がないが、設定を初期状態に戻す場合、プロファイルのファイルごと削除が必要なため、削除ボタンだけでも先に設置しておきたい(設定ファイルに関するデバッグ時もはかどるはず)

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.