Note: Bugzilla has a [somewhat esoteric][bugzilla-searchhelp] search syntax. To look for all open and closed WebExtension bugs that mentioned the
history
API, [try searching][bugzilla-searchhistory] forALL Component:WebExtensions #history
, which should turn up [Bug 1208334][]: "Implement history API for open extension API."
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// rev10 - https://gist.github.com/Noitidart/30e44f6d88423bf5096e | |
function xhrPromise(aUrlOrFileUri, aOptions={}) { | |
// does an async request | |
// aUrlOrFileUri is either a string of a FileURI such as `OS.Path.toFileURI(OS.Path.join(OS.Constants.Path.desktopDir, 'test.png'));` or a URL such as `http://github.com/wet-boew/wet-boew/archive/master.zip` | |
// :note: When using XMLHttpRequest to access a file:// URL the request.status is not properly set to 200 to indicate success. In such cases, request.readyState == 4, request.status == 0 and request.response will evaluate to true. | |
// Returns a promise | |
// resolves with xhr object | |
// rejects with object holding property "xhr" which holds the xhr object | |
var aOptionsDefaults = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @constructs Printer | |
*/ | |
function Printer(){}; | |
Printer.prototype = {}; | |
/** | |
* Returns if printer is local or network | |
* @returns {boolean} | |
*/ | |
Printer.prototype.isLocal = function(){return true;}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ForeignFunctionInterface #-} | |
module Test where | |
import Foreign.C.Types | |
hsfun :: CInt -> IO CInt | |
hsfun x = do | |
putStrLn "Hello from haskell" | |
return (42 * x) | |
hsfoo :: CInt -> IO CInt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint moz: true, undef: true, unused: true */ | |
/*global ctypes, require, console, exports */ | |
let { Cu } = require('chrome'); | |
let { setTimeout } = require('sdk/timers'); | |
Cu.import('resource://gre/modules/ctypes.jsm'); | |
var objc = ctypes.open(ctypes.libraryName('objc')); | |
var is64bit = ctypes.voidptr_t.size == 4 ? false : true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
class AXWindow { | |
let app: AXUIElement | |
let window: AXUIElement | |
init(app: AXUIElement, window: AXUIElement) { | |
self.app = app | |
self.window = window |
npm list -g --depth=0
- Public URL
- Status
Incomplete
- Last Updated
2018-08-23 04:10 EDT
If you use server rendering, keep in mind that neither useLayoutEffect
nor useEffect
can run until the JavaScript is downloaded.
You might see a warning if you try to useLayoutEffect
on the server. Here's two common ways to fix it.
If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect
instead.
function MyComponent() {