Skip to content

amp-bind: manually add custom functions to bind whitelist#9223

Merged
kmh287 merged 2 commits intoampproject:masterfrom
kmh287:bind_copyAndSplice_minified
May 9, 2017
Merged

amp-bind: manually add custom functions to bind whitelist#9223
kmh287 merged 2 commits intoampproject:masterfrom
kmh287:bind_copyAndSplice_minified

Conversation

@kmh287
Copy link
Copy Markdown
Contributor

@kmh287 kmh287 commented May 9, 2017

copyAndSplice has its name minified at compile time. I tried the @export annotation, putting the function at the module level and exporting it, but this is the only way I could get around the problem. I'm open to more suggestions if you have any.

Fixes #9222

/to @choumx

@kmh287 kmh287 requested a review from dreamofabear May 9, 2017 15:49
});

// Custom functions (non-js-built-ins) must be added manually as their names
// will be minifid at compile time.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minified

@kmh287 kmh287 merged commit 3090182 into ampproject:master May 9, 2017
@jridgewell
Copy link
Copy Markdown
Contributor

I still think we should stop using Function#name.

@dreamofabear
Copy link
Copy Markdown

This bug was related to Closure rather than browser support of Function#name. I suppose not using it might make this code more consistent looking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants