Skip to content

Instantly share code, notes, and snippets.

WebDriver BiDi

Support custom browser to client messages

  • to install and to remove pre-load (bootstrap) -> "to add and to remove" (to be in sync with the command names?)

Two suggestions below to slightly rephrase some paragraphs in the code example:

  • While this was already helpful to just call those pre-defined functions from within any script.evaluate or script.callFunction command their return value needed to be returned via the command’s response.

-> "This was already helpful to perform some setup logic, or to expose functions that could be called from script.evaluate or script.callFunction commands later on. However there was no way to properly handle dynamic situations, like monitoring DOM mutations and notify the client about the details."

function matchURLPattern(pattern, input) {
return pattern.test(input);
}
function parseURLPattern(patternObj) {
if (patternObj.type === "string") {
return new URLPattern(patternObj.pattern);
} else {
@Th3Whit3Wolf
Th3Whit3Wolf / arch_sec_install.sh
Last active April 26, 2024 22:49
Install arch on btrfs(w/ swapfile) on luks with rEFInd bootloader
#!/bin/bash
# 0 - SSH
# This isn't necessary but if you ssh into the computer all the other steps are copy and paste
# Set a password for root
passwd
# Get network access
iwctl
"""
commit 816bb258dfd315b5c2385e4ced6ac2e6a91b5c4f
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date: Wed Jun 20 14:28:06 2018 -0700
refactor shader editor initializer.
MozReview-Commit-ID: sLVVmv8ZUF
diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js
index 75dd62686eb67..c2552eccb9d9f 100644
From eb3687c365f4758d85a919812dc6c917a79e2458 Mon Sep 17 00:00:00 2001
From: Dale Harvey <dale@arandomurl.com>
Date: Mon, 21 Jan 2019 21:33:25 +0000
Subject: [PATCH 1/2] Bug 1486820 - Convert Opensearch files to WebExtensions.
r?mkaply, r?mixedpuppy
Tags: #secure-revision
Differential Revision: https://phabricator.services.mozilla.com/D17213
---
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Tests that preference helpers work properly with custom types of Float and Json.
const { PrefObserver } = require("devtools/client/shared/prefs");
// Use sinon for mocking.
const {sinon} = ChromeUtils.import("resource://testing-common/Sinon.jsm");
commit 387ecfc00706da584966738c193f457e8913a3b6
Author: Jason Laster <jlaster@mozilla.com>
Date: Thu Nov 7 16:20:12 2019 -0800
Whats New
diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js
index 4de05241f2d4..fb4233df7062 100644
--- a/devtools/client/definitions.js
+++ b/devtools/client/definitions.js
@wellington1993
wellington1993 / XPIInstall.jsm
Created May 20, 2020 17:40
view-source:resource://gre/modules/addons/XPIInstall.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/**
* This file contains most of the logic required to install extensions.
* In general, we try to avoid loading it until extension installation
* or update is required. Please keep that in mind when deciding whether
@wellington1993
wellington1993 / DevToolsUtils.js
Created August 26, 2019 17:56
resource://devtools/shared/DevToolsUtils.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* globals setImmediate, rpc */
"use strict";
/* General utilities used throughout devtools. */
@wellington1993
wellington1993 / kinto-http-client.js
Created January 3, 2020 16:19
resource://services-common/kinto-http-client.js
/*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,