javascript styles
Are you using "" or '' in javascript?
Are you using ; or none at the end of line?
Let's see how to use it in open source.
1.jQuery
using : "" and ;
API example
$.ajax({
url: "/api/getWeather",
data: {
zipcode: 97201
},
success: function( result ) {
$( "#weather-temp" ).html( "" + result + " degrees" );
}
});
Code example
https://github.com/jquery/jquery/blob/main/src/core/ready.js
if ( document.readyState !== "loading" ) {
window.setTimeout( jQuery.ready );
}
2.bootstrap
using : '' and none
Code example
https://github.com/twbs/bootstrap/blob/main/js/src/button.js
const NAME = 'button'
const DATA_KEY = 'bs.button'
const EVENT_KEY =.${DATA_KEY}
const DATA_API_KEY = '.data-api'
3.angular
using : '' and ;
https://github.com/angular/angular/blob/main/packages/core/src/application_tokens.ts
export const PLATFORM_ID = new InjectionToken('Platform ID', {
providedIn: 'platform',
factory: () => 'unknown', // set a default platform name, when none set explicitly
});
4.vue
using : '' and none
https://github.com/vuejs/vue/blob/main/src/core/components/keep-alive.ts
function matches(
pattern: string | RegExp | Array,
name: string
): boolean {
if (isArray(pattern)) {
return pattern.indexOf(name) > -1
} else if (typeof pattern === 'string') {
return pattern.split(',').indexOf(name) > -1
} else if (isRegExp(pattern)) {
return pattern.test(name)
}
return false
}
5.react
using : '' and ;
https://github.com/facebook/react/blob/main/packages/react-dom/src/client/ReactDOM.js
function createPortal(
children: ReactNodeList,
container: Element | DocumentFragment,
key: ?string = null,
): React$Portal {
if (!isValidContainer(container)) {
throw new Error('Target container is not a DOM element.');
}
return createPortalImpl(children, container, null, key);
}
Leave javascript styles to:
Read more #javascript posts
Best Posts From suseona
We have not curated any of pishio's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From suseona
- blog.suseona.com updates
- Hive Note MCP in the Claude Code
- Discovering Hive Note!
- The Rollercoaster of Trading: Chasing Profits in the Digital Wild West
- A Day Full of Bubbles and Pure Joy
- New AI Features on
- Weekend Diary
- A rewarding day.
- Successful today as well.
- Today is the zoo.
- A Day in May
- Building “Maknae Life” Game with AI: From Frontend Logic to Backend
- Writing a Post with OpenClaw
- Solar System 3D
- hourglass online hourglass ⏳
- Suseona Blog : Enhanced Performance & User Experience
- Updated Suseona Blog
- Visualizing Tides in 3D
- #1 호갱노노 만들어보기 with Google Antigravity
- Gemini로 호갱노노 만들어 보기