1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 06:07:59 +01:00

Comment on 'new' in HACKING

This commit is contained in:
Kris Maglione
2009-01-07 16:41:44 -05:00
parent 0cc75219d0
commit 15a64a0085
2 changed files with 9 additions and 7 deletions

View File

@@ -138,6 +138,14 @@ We try to be quite consistent, but of course, that's not always possible.
new immediately, but will probably do so over time, when I see it. new immediately, but will probably do so over time, when I see it.
--mst --mst
Actually, you're not sure of anything. You can call new (function (a)
a.substr(2)), and you don't get a new object. The only difference is
that it's called with 'this' set. Given that it's uncouth to name a
non-constructor function in CamelCase, and that most internal
constructors don't require new (and some, like String, break when
you use it), it just seems superfluous and distracting.
--Kris
== Testing/Optimization == == Testing/Optimization ==
TODO: Add some information here about testing/validation/etc. TODO: Add some information here about testing/validation/etc.

View File

@@ -86,13 +86,7 @@ function Hints() //{{{
// Used to open multiple hints // Used to open multiple hints
function hintSequenceElement(elem) function hintSequenceElement(elem)
{ {
// Want to always open sequence hints in background
// (remember: NEW_BACKGROUND_TAB and NEW_TAB semantics assume
// that loadInBackground=true)
if (options.getPref("browser.tabs.loadInBackground"))
buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB); buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB);
else
buffer.followLink(elem, liberator.NEW_TAB);
// Move to next element in sequence // Move to next element in sequence
// TODO: Maybe we find a *simple* way to keep the hints displayed rather than // TODO: Maybe we find a *simple* way to keep the hints displayed rather than