From: StackOverflow
document.getElementById("MyElement").className = "MyClass";
document.getElementById("MyElement").className += " MyClass";
From: StackOverflow
document.getElementById("MyElement").className = "MyClass";
document.getElementById("MyElement").className += " MyClass";
| const captureWebRTCAudio = (successHandler) => { | |
| return navigator.mediaDevices.getUserMedia({audio: true, video: false}).then(successHandler); | |
| }; | |
| export default captureWebRTCAudio; |
| /* Basic example of saving cookie using axios in node.js and session's recreation after expiration. | |
| * We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js | |
| * Also, this example supports parallel request and send only one create session request. | |
| * */ | |
| const BASE_URL = "https://google.com"; | |
| // Init instance of axios which works with BASE_URL | |
| const axiosInstance = axios.create({ baseURL: BASE_URL }); |
| /* App.svelte generated by Svelte v3.14.1 */ | |
| /* After terser compression: min:6.00kb / gzip:2.43kb / brotli:2.15kb */ | |
| const { | |
| SvelteComponent, | |
| append, | |
| attr, | |
| destroy_block, | |
| detach, | |
| element, | |
| empty, |
| // example vite.config.js | |
| import { cdn } from './vite-plugin-cdn' | |
| export default { | |
| plugins: [ | |
| // also supported: esm.run, jspm | |
| // loads the dep over the CDN during dev | |
| // auto downloads and includes into the bundle during build | |
| cdn('skypack', { | |
| vue: '^3.0.5' |
// Button.js => Button.css
import { chakra } from "@chakra-ui/magic";
import "@chakra-ui/css/Button.css";
<chakra.button mb="2" mt="2" _hover={{ bg: "red.200", _focus: {} }} />;
<button css={{mb: "2", mt="2", _hover: { bg: "red.200", _focus: {} }} />
const result = interpret(