Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 971495 - [System2] Instantiable HardwareButtons +shepherd #16280

Merged
merged 1 commit into from Feb 18, 2014

Conversation

timdream
Copy link
Contributor

No description provided.

@@ -48,272 +48,307 @@
//
'use strict';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent:

(function(window) {
function HB() { ... };
window.HB = HB;
}(this));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using the exports object instead, which we use in a few other files, can we do that instead?

https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/ttlview.js#L4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, 3 patterns from 3 people O_o

I don't like what @alivedise did coz it's simply redefining window with a non-useful closure. exports probably make more sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, exports make sense. I will file a bug to change the pattern to fit it of all modules in system.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I was having trouble getting JSHint to work when passing this into the closure. I would like this to work, but could not get it to pass jshint. If you have some magic, please let me know :)

timdream added a commit that referenced this pull request Feb 18, 2014
Bug 971495 - [System2] Instantiable HardwareButtons, r=alive
@timdream timdream merged commit 5b6e783 into mozilla-b2g:master Feb 18, 2014
@timdream timdream deleted the system2-hardwarebuttons branch February 18, 2014 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants