[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
const fireEvent = (dom, eventName) => {
const event = document.createEvent("HTMLEvents");
event.initEvent(eventName, true, true);
dom.dispatchEvent(event);
};
// 使い方
const targetInput = document.getElementById('dummy-input');
targetInput.value = 'なんか外から差し込みたい値';
fireEvent(targetInput, 'input'); // こうすることでユーザが 'なんか外から差し込みたい値' を入力したかのようにイベントを発火させる
classList#toggle を使うと簡単に実装できる。この手の jQuery にあった便利関数ないしそれに近いものが生の JS でも使えるのはありがたいことである。
こんな DM が Discord の公式から届いた。他にも色々書いてあったが今日は以下について。
Discord API Domain Migration
Last month, we excitedly announced our official move to discord.com. It was a long time in the making, and the work isn't done yet! For now, our API will continue to handle requests made to discordapp.com. On November 7, 2020 we will be dropping support for the discordapp.com domain in favor of discord.com. Please ensure that your libraries, bots, and applications are updated accordingly.
Due to technical constraints, our CDN domain will not be migrated and will remain cdn.discordapp.com for the foreseeable future.
翻訳すると次のようになる。
Discord API のドメイン移行
先月、Discord API のドメインを discord.com に移行することを告知しました。この移行はかなり前から準備してきましたが、まだ完了したわけではありません。discordapp.com に対してリクエストしているアプリはまだ存在しているからです。2020年の11月7日に discordapp.com へのリクエスト受付は終了します。お使いのライブラリ、bot、またアプリケーションのリクエスト先について変更をお願いします。
なお、技術上の問題があるため、CDN のドメイン(cdn.discordapp.com)の変更はもう少し先になる予定です。
DroidCam Wireless Webcam 等を使うことで PC のカメラとしてスマートフォンのカメラを利用できる。
在宅勤務になり、個人面談も遠隔になるわけである。普段の業務通話だと別にカメラ無しでもよいが、個人面談となると顔を見せたいことはある。そういったケースでこれは便利。古いスマートフォンをそのままカメラにする、などといった手も使える。
在宅勤務中はパジャマのまま仕事しているので着替えないといけなくなったが……