…handler. As these methods return promises, they can be chained. For example: js const myPromise = new Promise((resolve, reject) => { setTimeout(() => { resolve("foo"); }, 300); }); myPromise .then(handleFulfilledA, handleRejectedA) .then(handleFulfilledB, handleRejectedB) .then(h…
…t containing the variables requested // as keys and their corresponding values. const conf = mw . config . get ( [ 'wgServer' , 'wgPageName' , 'wgCanonicalSpecialPageName' , 'wgUserLanguage' ] ); if ( conf . wgCanonicalSpecialPageName === 'Blankpage' ) { // Do stuff... } MediaWik…
…odal, TextControl } from '@wordpress/components'; function CreatePageButton() { const [isOpen, setOpen] = useState( false ); const openModal = () => setOpen( true ); const closeModal = () => setOpen( false ); return ( <> <Button onClick={ openModal } variant="primary"> Create a n…
…er applications with different class hierarchies. This also means that ordinary constructors (in the Java or C++ sense) cannot be used to create DOM objects, since the underlying objects to be constructed may have little relationship to the DOM interfaces. The conventional soluti…
…t containing the variables requested // as keys and their corresponding values. const conf mw config get 'wgServer' 'wgPageName' 'wgCanonicalSpecialPageName' 'wgUserLanguage' ); if conf wgCanonicalSpecialPageName === 'Blankpage' // Do stuff... MediaWiki version: 1.22 r56762 A fra…
…ode:internal/process/execution:76:60) // at node:internal/main/eval_string:23:3 const name 'Will Robinson' console warn `Danger ${ name ! Danger!` // Prints: Danger Will Robinson! Danger!, to stderr Example using the Console class: const out getStreamSomehow () const err getStrea…
…d ); qApp -> processEvents QEventLoop :: AllEvents ); void Core :: initHeadless const QUrl url MltConnection :: construct QString ()); m_projectManager new ProjectManager this ); QMetaObject :: invokeMethod pCore -> projectManager (), "slotLoadHeadless" Qt :: QueuedConnection Q_A…
…dingRect frameRect rotationAngle if Math abs rotationAngle 0.1 return frameRect const angleRad rotationAngle Math PI 180.0 const absCos Math abs Math cos angleRad )); const absSin Math abs Math sin angleRad )); const originalWidth frameRect width const originalHeight frameRect he…
… function following this example: async function myProviderCreator( options ) { const objectType = options.objectType; // e.g., "postType/post" const objectId = options.objectId; // e.g., "123" const ydoc = options.ydoc; // Yjs document const awareness = options.awareness; // Yjs…
…l line number Diff line number Diff line @@ -266,7 +266,7 @@ void Core::initGUI(const QString &MltPath, const QUrl &Url, const QStringList &c QMetaObject :: invokeMethod this "cleanRestart" Qt :: QueuedConnection Q_ARG bool true )); }); connect m_splash Splash :: openBlank this t…
…44 --- a/libstore/copy.c +++ b/libstore/copy.c @@ -170,9 +170,19 @@ copy_clone (const struct store *from, struct store *to) const struct store_class store_copy_class = - STORAGE_COPY, "copy", copy_read, copy_write, copy_set_size, - copy_allocate_encoding, copy_encode, copy_decode…
… '@wordpress/data'; import { store as noticesStore } from '@wordpress/notices'; const ExampleComponent = () => { const notices = useSelect( ( select ) => select( noticesStore ).getNotices() ); return ( <ul> { notices.map( ( notice ) => ( <li key={ notice.ID }>{ notice.content }</…
…lumn < QString > ( "text" ); QTest :: addColumn < QString > ( "documentName" ); const QString untitled = i18n ( "Untitled" ); const auto untitledTemplate = kli18n ( "Untitled (%1)" ); QTest :: newRow ( "null" ) << QString () << untitled ; // Tests the initial state without ever c…
…ber wsp* ")" skewY: "skewY" wsp* "(" wsp* number wsp* ")" number: sign? integer-constant | sign? floating-point-constant comma-wsp: (wsp+ comma? wsp*) | (comma wsp*) comma: "," integer-constant: digit-sequence floating-point-constant: fractional-constant exponent? | digit-sequenc…
…ion to using web workers. Web Workers API A worker is an object created using a constructor (e.g., Worker() ) that runs a named JavaScript file — this file contains the code that will run in the worker thread; workers run in another global context that is different from the curre…