HN user

potch

1,537 karma

HTML5 Engineer at Mozilla; JavaScript/CSS fiend

I work for Mozilla, and speak for myself.

Posts13
Comments145
View on HN

Hello! Author here. I'm a fan of web components for widgets and embeddable third-party interfaces. I'm not as much a fan of them to wrap a site's primary content, for both accessibility and user styling reasons.

JavaScript is pass-by-reference for all Objects and Arrays. Value types are pass-by-value.

    let obj = {a: 1}
    
    function foo(arg) {
      return obj === arg;
    }
    
    foo(obj) // true
The === operator operates on object not by comparing their value, but by comparing their memory reference [1]. A function argument variable can be reassigned using = in the function body, but that changes which location in memory the reference points to and isn't somehow "proof" of pass-by-value.

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Firefox 58 8 years ago

I came to it from the web development world, and after getting into speaking transferred internally onto our DevRel team. We're a small team- we encourage any Mozilla employee to speak about their own work if they want, so there's only a few of us for whom it's a full-time job.

Since we're a small team, it's pretty uncommon for a specifically devrel role to open up, but the sibling reply from my teammate callahad is spot-on for how to get involved with Mozilla and Firefox!

I've floated the idea of allowing various video formats in <source> for the <picture> element. Would allow for the right codec to be selected, and would easily allow for a <img src="foo.gif"> as the final fallback. Might be worth pushing on more.

Perhaps peruse this: https://www.mozilla.org/en-US/mission/

Firefox is Mozilla's flagship, and the largest by far way in which we achieve our mission, but our goal is a healthy and open internet.

Additionally, this is a great way to determine whether something like this would work well as an in-browser feature, and we've built it in such a way that it works in more browsers than just Firefox on day one.

Quick breakdown of what's going on here (I work at Mozilla, and have worked on the Add-ons site in the past):

The "Get Add-ons" view in Firefox is an iframe to a page hosted by addons.mozilla.org. AMO, as all Mozilla sites, use GA to collect aggregate visitor statistics. We negotiated a special contract with Google [1] to only collect a subset of data and that that data is only used for statistical purposes.

Google Analytics is only loaded when this view is loaded, and is not otherwise "inside" Firefox. I filed an issue [2] to make sure that our privacy policy is linked from the Get Add-ons view so users can be better informed.

Mozilla tries to walk a very thin wire to ensure that we have the data we need to make sure our products are working properly without being intrusive, and to let concerned users opt-out of even that baseline data collection.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=697436#c14 [2] https://github.com/mozilla/addons-frontend/issues/2789

I work at Mozilla, but I'm excited about this because I'm a web developer!

If you've ever tried to use flexbox to align content across multiple rows (like laying out a form with labels), you'd know that it's not a true two-dimensional layout tool. CSS Grid is, and will likely supplant flexbox as a flexbox is merely a one row/column grid.

The inspector is a pretty handy way to see what's going on under the hood, and being able to see the line numbers and named areas is great for visual debugging.

Regressive Web Apps 10 years ago

"Progressive Web Apps" is a Google brand. It's made of some good best practices and great technologies, but they reserve the right to re-define it and change the rewards around it however they choose. Install buttons are the carrot, and search rankings are the stick. Will non PWA-compliant but otherwise fast, well-made mobile web sites rank as highly as PWAs?

TiltBrush by Google 10 years ago

I got a chance to try tiltbrush recently. I drew a little cottage around myself, complete with a table and couch. While I was painting the ceiling, I subconsciously stepped around my couch to avoid tripping on it. That's when VR clicked for me :)

We put ads that didn't require an extensive tracking network in the new tab page of Firefox. We were able to make some money on them and show how to do ads respectfully. Even so, it was decided to remove them from Firefox as they didn't provide enough value to the user.

Network Effect 11 years ago

Works great in Firefox so long as you lie about what browser you're using. Cool project, wish it wasn't a jerk about user agent sniffing.